httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jha, Sanjeev" <>
Subject [users@httpd] Rewrite question
Date Tue, 26 Nov 2002 17:48:58 GMT
I have a rewrite question on which I am trying different options but not
getting exactly what I am looking for-

I am looking for --  Redirect  to (
for example).
Note that using DNS, IS pointing to same IP and
therefore works but for some other reason, we want the URL
to be changed to if someone just comes through 

I tried following --
	1> RewriteRule ^($$1 [R]
--> didn't work. Doing nothing.
	2> RewriteRule ^(.*)(/)$$1/  [R]
--> I noticed, it's keep redirecting and site never comes up.
	3> RewriteRule ^(.*)(/)$$1/index.html  [R]
--> This one works. But the problem is I have some part of web site where
there is no index.html but index.jsp or index.htm page only. Therefore
getting 404 for those.
	4> RewriteCond %{HTTP_HOST}   !^domain\.com [NC]
	   RewriteCond %{HTTP_HOST}   !^$
	   RewriteRule ^/(.*)$1 [L,R]
--> Trying to copy one of the example on I might be missing
something. After this change, the site keep redirecting itself to and like in #2, it never came up.
	5> RewriteRule*)$1 [R]
--> Don't know why I did this, but didn't work either
	6> I tried setting up Virtual host for "ServerName"  and
"Redirect /" . Nothing happened.

Any suggestion ?


View raw message