Forum Moderators: phranque

Message Too Old, No Replies

Mod rewrite Gone Mod wrong

         

markymark

9:33 am on Oct 21, 2008 (gmt 0)

10+ Year Member



OK, our web host has changed to Apache 2 and now my mod_rewrite isn't working. Essentailly, there is a page I want to show as the homepage, but this is now not working at all. The htaccess is below, but I just can't see what I need to do to fix the problem.

RewriteEngine On
#RewriteRule ^$ [site.com...] [PT,L]
#RewriteRule ^/$ [site.com...] [PT,L]
#RewriteRule ^index\.php$ [site.com...] [PT,L]

g1smd

1:35 pm on Oct 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



"Not working" is too broad a description. What was it supposed to do? What does it do? How does that differ from what you expected?

You appear to be using a series of 302 redirects (as indicated by using a domain name in the target, but there is no

R=3nn
code to say it is a redirect).

I would have assumed that you would want a rewrite, not a redirect?

For a rewrite, the target is a folder and filepath, and the domain name must not be included.

The first line would work only in .htaccess and the second line would work only in httpd.conf - otherwise they are functionally identical. Where are you using this code?

The word

QUERY_STRING
should be all in Upper Case.

Samizdata

1:44 pm on Oct 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm no expert, but I don't think rules that are commented out (#) will do anything anyway.