Simple (I think) Rewrite

Topics: User Forum
Nov 2, 2007 at 4:06 PM
Edited Nov 2, 2007 at 4:11 PM
I want to translate URL as follows

mydomain.com/ = mydomain.com/subdir
mydomain.com/blah = mydomain.com/subdir/blah
mydomain.com/hhe/file.ext = mydomain.com/subdir/hhe/file.ext

mydomain.com/subdir = mydomain.com/subdir (stays the same.)

This is what I came up with, but i'm not having much luck with it.

RewriteCond %{HTTP_HOST} !^/subdir.*$
RewriteRule ^/(.*)$ http://mydomain.org/subdir/$1 [L]

So it should be (when NOT /subdir) insert /subdir as the base directory.
Nov 2, 2007 at 6:02 PM
Ok, something is up. I created the following rule to test IIRF.

RewriteRule ^(.*)$ http://mydomain.org/subdir/index.html

Which, if i'm correct will rewrite every URL to "http://mydomain.org/subdir/index.html"

It still is not working....