Forum Moderators: phranque

Message Too Old, No Replies

Rewrite rule for homepage only?

         

Patrick Taylor

9:43 am on Apr 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would like to set up a rewrite rule to apply only to the homepage (eg: on the page w*w.domain.com/). I've tried this:

RewriteCond %{REQUEST_URI} ^/$
RewriteRule etc etc

Obviously this is not correct, as it doesn't work. Is it possible?

jdMorgan

3:16 pm on Apr 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually, the code you show *is* correct -- what there is of it.

The error is likely outside the scope of your RewriteCond.

Jim

extras

7:29 pm on Apr 2, 2006 (gmt 0)

10+ Year Member



You may want to cover the (rare) case of URL with many slashes.
RewriteCond %{REQUEST_URI} ^/+$

And probably you don't need the RewriteCond.
RewriteRule ^/*$ whatever