apache mod_rewrite redirection problem
- by warttack
ok i am having a problem with redirection on apache, i have a domain configured on my hosting account but the domain needs to be redirected to a folder. eg: / is root of server where the mysite.com answers /mysite is where the files are so i got this htaccess code to do the job:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$
RewriteCond %{REQUEST_URI} !^/mysite/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /mysite/$1
RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$
RewriteRule ^(/)?$ mysite/index.php [L]
plus i made an index.php to redirect to mysite folder.
everything seems to be working good the only problem is i added a forum on /mysite/forums/
and for some reason instead of getting mysite.com/forums/ in the browser im getting mysite.com/mysite/forums/
could anyone help me solve this problem?
Thanks in advance!