httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Grunnell" <jgrunn...@firstnet.net.uk>
Subject [users@httpd] mod rewrite problem
Date Thu, 22 May 2003 09:50:21 GMT
Making some progess. I now have:

...
RewriteEngine on
RewriteLogLevel 9
RewriteLog logs/rewrite.log
RewriteCond %{HTTP_HOST} ^www\..*
RewriteRule ^/(.*)$ http://www1.whatever.com/$1
...

Which sends www.* to www1.whatever.com/

But is there a single rule that for example would send:
www.test1.com --> www1.test1.com
www.test2.com --> www1.test2.com
www.test3.com --> www1.test3.com
?

Thanks - J.

-----Original Message-----
From: Julian Grunnell 
Sent: Thursday, May 22, 2003 10:23 AM
To: 'users@httpd.apache.org'
Subject: RE: [users@httpd] mod rewrite problem


yeh - I can do that kind of rewrite rule. But what I want to do is send.

www.anything.here to www1.anything.here for example.

I just want to be able to switch the "www" part to "www1", the other parts of the hostname
could be any number of hosts.

J.

-----Original Message-----
From: Joseph A Nagy Jr [mailto:joseph_a_nagy_jr@charter.net]
Sent: Thursday, May 22, 2003 10:15 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] mod rewrite problem


Julian Grunnell wrote:
> Hi - could someone pls help me with a mod rewrite problem I'm having pls?
> 
> I would like to have a rewrite rule to be applied to www.anything.here to goto www1.anything.here?
> 
> I have tried several configs but just can't quite get it right, any help would be appreciated.
> 
> I currently have:
> 
> ...
> RewriteEngine on
> RewriteLogLevel 9
> RewriteLog logs/rewrite.log
> 
> RewriteCond %{HTTP_HOST} ^www\..*
> RewriteRule ????????
<snip>

I use the following rule to have (the now defunct website) 
http://finding-lauren.homelinux.org automatically redirect to 
http://finding-lauren.homelinux.org/content/

     RewriteEngine on
     RewriteRule   ^/$  /content/  [R]

The rewrite rule for what you want should be similar, but I could be 
wrong. Of course I'm assuming you've read the mod_rewrite section in the 
supplied Apache Documentation. :)


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


###  This email has been checked for all known viruses by the 
###  Firstnet anti-virus system - http://www.firstnet.net.uk 
###  Please email fav@firstnet.net.uk for details. 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message