I have this website coded in php: http://iioengine.com/
MyBB is installed in a subfolder: http://iioengine.com/forums/, it uses an htaccess file to remove the php extension from its page URLs. As an example, this link works: http://iioengine.com/forums/Forum-Box2D
I would like to remove the URL extensions from all the non-MyBB parts of my website - to make this page: http://iioengine.com/demos.php, accessible from this link: http://iioengine.com/demos
I thought this would be straightforward, but every .htaccess file I have implemented just results in 404 pages for all queries. Here is what I have now:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
</IfModule>
It gives me 404 pages for non-.php queries, but I found that if I add this line:
RewriteRule . /index.php [L]
all non-'.php' requests get forwarded to the homepage... So mod_rewrite is definitely enabled, it's just not working right. Anyone know what the issue could be?
If I can get this working, I also need some rules to cut off the extension even if it is in the query (since all of my hyperlinks use extensions). what do I need in my htaccess file to remove the file extension from the URL in all cases? Thanks