Jump to content

hiding .php extension


rossh

Recommended Posts

Hi i don't have access to modify any apache settings on the server.  I want to hide the .php extension and i'm  trying out renaming the file without an extension and then including ForceType application/x-httpd-php in .htaccess Is this the best method and what are the down sides before i get stuck into my whole site!  Is there alternative if this is not a prefered option?

Thanks

R
Link to comment
https://forums.phpfreaks.com/topic/24521-hiding-php-extension/
Share on other sites

Hi thanks for getting back to me.  I've tried both:-

Options +FollowSymlinks
RewriteEngine on
AddType application/x-httpd-php .htm
AddType application/x-httpd-php .html

and

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.+)\.html$ $1.php

and both give me a 500 error?

Thanks again

R
Link to comment
https://forums.phpfreaks.com/topic/24521-hiding-php-extension/#findComment-111787
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.