htaccess question (more to do with reg expressions)

Soldato
Joined
4 Jul 2004
Posts
2,647
Location
aberdeen
Hello,
At the moment I have this set up for a site (i used to have many pages, now only one):

RewriteRule ^(.*)/$ http://www.mydomain.com/ [R=301,L]



However now I want to add a directory, http://www.mydomain.com/dir/
but of course unless I enter .../dir (no trailing /) it redirects to mydomain.com

So how can I do basically redirect anything but /dir?

IIRC it is something to do with ^, isn't it?
 
Back
Top Bottom