Forum Moderators: phranque

Message Too Old, No Replies

allowing .txt access with RewriteRule (.*) index.php

         

GerBot

1:15 pm on Jul 28, 2005 (gmt 0)

10+ Year Member



Hi Guys,
I have a mod rewrite on a directory in my site like this:

RewriteEngine On
RewriteRule (.*) index.php

but I don't want .txt file extensions to be effected.

How do I rewrite in this exception so my robots.txt file still loads?

thanks

GerBot

1:24 pm on Jul 28, 2005 (gmt 0)

10+ Year Member



I found my answer.

RewriteEngine On
RewriteRule (.htm) index.php

so now I'm only rewriting '.htm' files

I hope this helps someone else

dcrombie

2:52 pm on Jul 28, 2005 (gmt 0)



If you want to rewrite only .htm files, you need this:

RewriteEngine On  
RewriteRule \.htm$ index.php

and maybe an [R] or [R=301]

;)