httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harland Christofferson <harl...@zerocrossings.com>
Subject [users@httpd] mod_rewrite
Date Wed, 13 Nov 2002 17:47:41 GMT
I am trying to have the Location window of a web browser display a URL 
which is different than the URL  actually being accessed. I have tried 
to follow the example of Canonical Hostnames at 
http://httpd.apache.org/docs/misc/rewriteguide.html ... replacing 
generic information w/ information specific to my application.

RewriteEngine on
RewriteLog somefile
RewriteLogLevel 9

RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^/(.*)         http://fully.qualified.domain.name:%{SERVER_PORT}/$1 [L,R]
RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/(.*)         http://fully.qualified.domain.name/$1 [L,R]

For example, when my server serves 
http://my.generichostname.com:3030/~user/stuff/
I wish the location window to read http://stunning.webstuff.com/

The logfile tells me what is going on but it is nothing that I 
understand. Suggenstions??


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