Hi,
Can anyone help; I have urls with .php extensions.
http://domain.com/our_profile.php
Is there a way to remove the .php file extensions using .htaccess?
http://domain.com/our_profile/
Many thanks for any help.
Hi,
Can anyone help; I have urls with .php extensions.
http://domain.com/our_profile.php
Is there a way to remove the .php file extensions using .htaccess?
http://domain.com/our_profile/
Many thanks for any help.
Last edited by john0611; 01-10-2010 at 05:42 PM.
Code:Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php
Hi, thanks for quick reply,
I am getting a 500 Internal Server Error, I am relatively new to .htaccess I am not quiet sure whats going on. I know how to initiated the htaccess file but not sure why the 500 error?
Thanks again for your reply.
You're getting the 500 error because this option isn't enabled in http.conf. If you're doing this locally, find http.conf in the parent directory of your www folder, if your doing this online, and the cpanel isn't giving you an option to modify it, contact your host.
But, if it does, find this line:
And remove the #.Code:#LoadModule rewrite_module modules/mod_rewrite.so
Good luck
Jeremy | jfein.net
Make sure you put:
domain.com/myfilehere
And not:
domain.com/myfilehere/
The last / will give you the error.
john0611 (01-10-2010)
john0611 (01-10-2010)
Cracked it!
Thanks for all the help guys!
Having said that, does anyone have any idea why the trailing / brings up an internal error, and have any way of fixing it?
Cheers.
Bookmarks