I got a forum installed, which is accessed on sitename.com. I need to make some other pages accessed on sitename.com, and forum on sitename.com/forum. I dont think moving forum to another folder is a good idea, so i decided to use mod_rewrite. Here is my .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]
RewriteRule ^forum$ /index.php$1 [S=3]
RewriteRule ^forum/$ /index.php$1 [S=2]
RewriteRule ^forum/(.*)$ /$1 [S=1]
RewriteRule ^$ homepage/ [L]
</IfModule>
First 2 lines are used to redirect from www.sitename.com to sitename.com. Next 3 rules are used to redirect all sitename.com/forum requests, and the last rule redirects all sitename.com requests to homepage folder.
Here is a problem with current .htaccess: it shows /homepage/index.php if i open sitename.com, but it doesnt if i open sitename.com/index.php. instead it shows /index.php.
any ideas how to fix this?