BowserKing Posted August 26, 2007 Share Posted August 26, 2007 Hi, I have a question. Is there any way possible to remove the extension to make a url look from yoursite.com/index.php to yoursite.com/index ? Quote Link to comment https://forums.phpfreaks.com/topic/66717-remove-extensions/ Share on other sites More sharing options...
matthewhaworth Posted August 26, 2007 Share Posted August 26, 2007 Ask in the apache forum.. though I think it can be changed in php.ini too Quote Link to comment https://forums.phpfreaks.com/topic/66717-remove-extensions/#findComment-334281 Share on other sites More sharing options...
Fadion Posted August 26, 2007 Share Posted August 26, 2007 In .htaccess copy these two lines: RewriteEngine On RewriteRule ^([^\.\?]+)(\?.*)?$ $1.php And u'll access your php files without the extension. Quote Link to comment https://forums.phpfreaks.com/topic/66717-remove-extensions/#findComment-334288 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.