Hazukiy Posted April 4, 2013 Share Posted April 4, 2013 Hi, I was wondering, how would I make it so that when people access my site, the extension of that file is hidden in the URL? Thanks? Link to comment https://forums.phpfreaks.com/topic/276513-hide-php-extension/ Share on other sites More sharing options...
Psycho Posted April 4, 2013 Share Posted April 4, 2013 Modrewrite Link to comment https://forums.phpfreaks.com/topic/276513-hide-php-extension/#findComment-1422805 Share on other sites More sharing options...
requinix Posted April 4, 2013 Share Posted April 4, 2013 If you don't mind being able to hide all extensions (you don't have to) and you use Apache then you can put Options +MultiViewsin your .htaccess. Link to comment https://forums.phpfreaks.com/topic/276513-hide-php-extension/#findComment-1422807 Share on other sites More sharing options...
Hazukiy Posted April 4, 2013 Author Share Posted April 4, 2013 I have this in the .htaccess file. I'm not sure this is correct. Link to comment https://forums.phpfreaks.com/topic/276513-hide-php-extension/#findComment-1422859 Share on other sites More sharing options...
requinix Posted April 4, 2013 Share Posted April 4, 2013 Because...? You do have to fix your links to not include the extension - that doesn't happen for free. Link to comment https://forums.phpfreaks.com/topic/276513-hide-php-extension/#findComment-1422924 Share on other sites More sharing options...
Hazukiy Posted April 4, 2013 Author Share Posted April 4, 2013 Because...? You do have to fix your links to not include the extension - that doesn't happen for free. Wait no It didn't appear, I put a quote under it Link to comment https://forums.phpfreaks.com/topic/276513-hide-php-extension/#findComment-1422933 Share on other sites More sharing options...
requinix Posted April 5, 2013 Share Posted April 5, 2013 ...What? Link to comment https://forums.phpfreaks.com/topic/276513-hide-php-extension/#findComment-1423121 Share on other sites More sharing options...
Hazukiy Posted April 5, 2013 Author Share Posted April 5, 2013 ...What? Aha sorry, mind fart. What I meant to say was that I have this in the htaccess file and it doesn't work: # Do not remove this line, otherwise mod_rewrite rules will stop working RewriteBase / Options +MultiViews Link to comment https://forums.phpfreaks.com/topic/276513-hide-php-extension/#findComment-1423126 Share on other sites More sharing options...
requinix Posted April 5, 2013 Share Posted April 5, 2013 So you've got, say, /index.php and you have your links pointing to "/index" and it's not working? What do you know about your server setup? Link to comment https://forums.phpfreaks.com/topic/276513-hide-php-extension/#findComment-1423129 Share on other sites More sharing options...
Hazukiy Posted April 5, 2013 Author Share Posted April 5, 2013 So you've got, say, /index.php and you have your links pointing to "/index" and it's not working? What do you know about your server setup? Oh do I need to take the .php out of my links? Link to comment https://forums.phpfreaks.com/topic/276513-hide-php-extension/#findComment-1423167 Share on other sites More sharing options...
Jessica Posted April 5, 2013 Share Posted April 5, 2013 Yes. Link to comment https://forums.phpfreaks.com/topic/276513-hide-php-extension/#findComment-1423174 Share on other sites More sharing options...
Hazukiy Posted April 5, 2013 Author Share Posted April 5, 2013 Yes. Ah ok thank you. Link to comment https://forums.phpfreaks.com/topic/276513-hide-php-extension/#findComment-1423177 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.