Forum Moderators: phranque

Message Too Old, No Replies

mysite.com to mysite.com/site

         

TGecho

10:56 pm on Sep 3, 2003 (gmt 0)

10+ Year Member



I want to have the files for mysite.com stored in mysite.com/site. I looked at redirect, but that doesn't seem to do what I want. Anybody have a direction they can point me in?

jdMorgan

12:14 am on Sep 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



TGecho,

> to have the files for mysite.com stored in mysite.com/site

You could use Apache mod_rewrite to transparently redirect requests for anything except mysite.com/site<anything> to mysite.com\site<anything>

In .htaccess:


Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/site
RewriteRule ^(.*)$ /site/$1 [L]

See Introduction to mod_rewrite [webmasterworld.com]

Jim