php - Remove file extensions using .htaccess (Apache2) -


i have tried bunch of different ways , getting frustrated

options -indexes options +multiviews  rewriteengine on rewritecond %{request_filename} !-d rewritecond %{request_filename}\.php -f rewriterule ^(.*)$ $1.php 

^ doesn't work @ all

options -indexes options +multiviews <ifmodule mod_rewrite.c>  rewriteengine on rewritebase /  # unless directory, remove trailing slash rewritecond %{request_filename} !-d rewriterule ^([^/]+)/$ http://squeakcode.com/$1 [r=301,l]  # redirect external .php requests extensionless url rewritecond %{request_method} !post rewritecond %{the_request} ^(.+)\.php([#?][^\ ]*)?\ http/ rewriterule ^(.+)\.php$ http://squeakcode.com/$1 [r=301,l]  # resolve .php file extensionless php urls rewriterule ^([^/.]+)$ $1.php [l]  </ifmodule> 

^works goes page doesn't exist.

as mentioned second code snippet works sort of. problem removes .php doesn't pull .php file goes not found page.

am missing in apache config?


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -