Forum Moderators: phranque
Because just about every page is in this directory, I'd like to use .htaccess mod_rewrite to make this directory appear as the root.
For example, a page located at [mydomain.com...] would be accessible from [mydomain.com...]
Similarly, a page located at [mydomain.com...] would be accessible from [mydomain.com...]
Can anyone tell me exactly what I need to place in .htaccess to be able to do this?
Thanks!
[edited by: DaveAtIFG at 11:41 pm (utc) on July 15, 2003]
[edit reason] "Generalized" specific URLs [/edit]
Welcome to WebmasterWorld [webmasterworld.com]!
You will need a RewriteCond to exclude your subdomains from being rewritten:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.com [NC]
RewriteRule ^(.*)$ /forum/$1 [L]
Ref: Introduction to mod_rewrite [webmasterworld.com]
HTH,
Jim