
October 17th, 2008, 04:04 AM
|
 |
Contributing User
|
|
Join Date: Mar 2005
Location: UK
|
|
Quote: | Originally Posted by requinix
Code:
RewriteRule ^/?((?!start/here).*|.*(?<!\.php)) /testdir/$1 [R=301,QSA,L]
Try that.
[edit] I interpreted what you said to mean there should be a redirection if it doesn't start with "start/here" OR the request doesn't end with ".php" |
Sorry i meant it doesn't start with start/here but it needs to end with .php
My latest is try is:
RewriteRule ^/?((?!start/here).*(\.php$)) /testdir/$1 [R=301,QSA,L]
I want to redirect any url which doesn't start with /start/here/ but end with .htm
I also need to add anything inbetween / and .htm to /testdir
My above example redirects from
/test/test/x.htm
to /testdir/testdir/testdir/x.htm
It warns of a redirect loop and crashes out
i need it to redirect to
/testdir/test/x/
|