dubc07 Posted October 9, 2008 Share Posted October 9, 2008 Is there a way php can change the extension in the url to be your own? Get rid of the .php and put your own .fun let say index.php to index.custom Link to comment https://forums.phpfreaks.com/topic/127754-custom-php-extension/ Share on other sites More sharing options...
DarkWater Posted October 9, 2008 Share Posted October 9, 2008 Add a RewriteRule to your .htaccess like this: RewriteEngine On RewriteRule (.+?)\.custom $1.php Or play around with the Types in your httpd.conf Link to comment https://forums.phpfreaks.com/topic/127754-custom-php-extension/#findComment-661192 Share on other sites More sharing options...
GingerRobot Posted October 9, 2008 Share Posted October 9, 2008 Find this line in your httpd.conf: AddType application/x-httpd-php .php And add this line: AddType application/x-httpd-php .fun If you dont want this extension used across your whole site, use a .htaccess file instead. Link to comment https://forums.phpfreaks.com/topic/127754-custom-php-extension/#findComment-661337 Share on other sites More sharing options...
The Little Guy Posted October 9, 2008 Share Posted October 9, 2008 .htaccess: Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteRule ^(.+).zig$ /$1.php [NC,L] Link to comment https://forums.phpfreaks.com/topic/127754-custom-php-extension/#findComment-661341 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.