Remove .php from single file with .htaccess -


i know there hundreads of these questions, , i've went through each one, copied code , put link in, still redirects 404. having mind blank right now. want make example.com/web load example.com/web.php

rewriteengine on rewritebase /  rewriterule ^web$ /web.php errordocument 404 /404.php 

i figured out problem. don't know why, added

options -multiviews 

above rewriteengine on , loads page fine answer below.

try using below rule instead...

rewriterule ^web/?$ web.php  [nc] 

also rule optional slash @ end...so won't throw 404 if have url like

http://www.domain.com/web 

or

http://www.domain.com/web/ 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -