httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Grunnell" <jgrunn...@firstnet.net.uk>
Subject RE: [users@httpd] mod rewrite problem
Date Thu, 22 May 2003 12:59:57 GMT
Cheers James - works a treat.

J. ;-)

-----Original Message-----
From: j.knowling@mgn.co.uk [mailto:j.knowling@mgn.co.uk]
Sent: Thursday, May 22, 2003 1:32 PM
To: users@httpd.apache.org
Cc: Apache-Users (E-mail)
Subject: Re: [users@httpd] mod rewrite problem



Hi Julian,

maybe you could do:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$
RewriteRule ^/(.*)$ http://www1.%1/$1

to do what you want?

James.



|---------+---------------------------->
|         |           "Julian Grunnell"|
|         |           <jgrunnell@firstn|
|         |           et.net.uk>       |
|         |                            |
|         |           22/05/2003 10:50 |
|         |           Please respond to|
|         |           users            |
|         |                            |
|---------+---------------------------->
  >------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                      
                                       |
  |       To:       "Apache-Users (E-mail)" <users@httpd.apache.org>               
                                             |
  |       cc:                                                                            
                                       |
  |       Subject:  [users@httpd] mod rewrite problem                                    
                                       |
  >------------------------------------------------------------------------------------------------------------------------------|




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







********************
IMPORTANT NOTICE  This email (including any attachments) is meant only for the intended recipient.
It may also contain confidential and privileged information.  If you are not the intended
recipient, any reliance on, use, disclosure, distribution or copying of this email or attachments
is strictly prohibited. Please notify the sender immediately by email if you have received
this message by mistake and delete the email and all attachments. 

Any views or opinions in this email are solely those of the author and do not necessarily
represent those of Trinity Mirror PLC or its associated group companies (hereinafter referred
to as "TM Group"). TM Group accept no liability for the content of this email, or for the
consequences of any actions taken on the basis of the information provided, unless that information
is subsequently confirmed in writing. Although every reasonable effort is made to keep its
network free from viruses, TM Group accept no liability for any virus transmitted by this
email or any attachments and the recipient should use up-to-date virus checking software.
Email to or from this address may be subject to interception or monitoring for operational
reasons or for lawful business practices. 

Trinity Mirror PLC is the parent  company of the Trinity Mirror group of companies and is
registered in England No 82548, with its address at One Canada Square, Canary Wharf, London
E14 5AP. 
********************

---------------------------------------------------------------------
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