On my website my pages are all .php extensions, and I was wondering how could I properly hide these in the browser. Example: mysite.com/page.php to: mysite.com/page I tried creating an HTACCESS file with this in it: Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*)\.htm$ $1.php [nc] Code (markup): but that didn't seem to work By the way this is a normal static (well dynamic) website, no CMS behind it
I think you would need to setup an array with PHP that serves your content, so that your URLs will look like typical 'generated' URLs, like "domain.com/?p=page". It's not too hard to accomplish, just search Google for a tutorial.
Yea I already did that hence why I'm posting here looking for a better solution. All the tutorials I read off Google told me to create an HTACCESS file and that isn't working. But thanks anyways, if anyone has a solution or link to one I would appreciate it
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php Code (markup): This should work for you.