how to hide php extension using htaccess

Solutions on MaxInterview for how to hide php extension using htaccess by the best coders in the world

showing results for - "how to hide php extension using htaccess"
Leonie
20 Jan 2020
1//put this piece of code in the root file .htaccess
2RewriteEngine on
3#remove extension html
4RewriteCond %{REQUEST_FILENAME} !-d
5RewriteCond %{REQUEST_FILENAME}\.html -f
6RewriteRule ^(.*)$ $1.html [NC,L]
7
8#remove extension php
9RewriteCond %{REQUEST_FILENAME} !-d 
10RewriteCond %{REQUEST_FILENAME}\.php -f 
11RewriteRule ^(.*)$ $1.php
Riccardo
29 Sep 2019
1RewriteEngine On
2RewriteCond %{REQUEST_FILENAME} !-f
3RewriteRule ^([^/]+)/$ $1.php
4RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
5RewriteCond %{REQUEST_FILENAME} !-f
6RewriteCond %{REQUEST_FILENAME} !-d
7RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
8RewriteRule (.*)$ /$1/ [R=301,L]
9
10#This works with xxx/index.php too (visiting mysite.com/xxx/)
Beryl
25 Jan 2016
1RewriteEngine On
2RewriteCond %{REQUEST_FILENAME} !-f
3RewriteRule ^([^\.]+)$ $1.php [NC,L]
4
Manuel
28 Aug 2020
1# Apache Rewrite Rules
2 <IfModule mod_rewrite.c>
3  Options +FollowSymLinks
4  RewriteEngine On
5  RewriteBase /
6
7# Add trailing slash to url
8  RewriteCond %{REQUEST_FILENAME} !-f
9  RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
10  RewriteRule ^(.*)$ $1/ [R=301,L]
11
12# Remove .php-extension from url
13  RewriteCond %{REQUEST_FILENAME} !-d
14  RewriteCond %{REQUEST_FILENAME}\.php -f
15  RewriteRule ^([^\.]+)/$ $1.php 
16
17# End of Apache Rewrite Rules
18 </IfModule>
19
queries leading to this page
remove php from url from phphtaccess hide php extension from urlhow to remove php extension from url using javascripthow to remove file extention from url phprewriterule remove php from urlhtaccess remove php and htmlremove file extension htaccessremove get from url phpremove the php extension from urlremove extension from file name phphow to remove phpphp remove url parameters htaccess hide file extension phpremove fomr url phpphp remove 23 in urlphp remove extension from a file nameremove html in htaccessremoving php extension from url php remove htaccess in core phpphp remove www from urlhow to remove php extension from url in phphtacces hide php extentionremove php extension from search urlremove the php from the urlremove text from url phphow to remove php in urlremove php using url routeremove variable from url phpphp delete link in stringremove php extension from url htaccesshtacess remove need op phphide php extension htaccessphp code for php extension removeremove php on page lodremove php from end of urlphp remove php from urlforce php in include to remove extension linksremove www from url phpremove php extension from url w3schoolsremove 25 from url phphtaccess remove php extensionhow to remove php from url in core phphow to remove the php from url in simple phphow to remove php from url within the folderhow to remove any url within a string in phpremove php from url using htaccessapache htaccess remove php extensionphp hide extension htaccesshow to remove extensions from url phpget rid of htaccess file extensionsa code to remove php 3f extensionhow to remove the php extension in urlremove php from url htaccess in phprewrite php extension htaccessauto remove php or html htaccessremove php extension fromhow to remove php in url in phphtaccess hide htmlhow to remove php in urlremove url from text phpremove php from url all iner pagesremove the php from urlremove the php from the url windowshtml extension remove htaccess remove php extensionhtacces remove php php extension remove htaccess remove php and 3fremove url after com php php remove htaccessremove php file extension from urlhow to remove php from url in phpremove url phpremove php extension from urlremove url query in phpwisthout php and htlm extension htaccesshow to remove from url in php htaccess url without extensionhow to remove php extension from url htaccesshtaccess remove php but allow post requrestphp htaccess hide file extensionremove word from url phpremove extension from filename in url phphow to clear the html file extension namephp remove fbclid from urlhow to remove php html extensions with htaccess and redirect to 2fremove php on page loadhow to remove any url link within a string in phphow to hide file extensions in phphow to remove php extension from url using htaccess htaceess remove php from urlphp remove from uriphp remove url from stringhow to remove the php from url using filenameremove php extension htaccessremove current url from string phphow to hide php html tag in urlhow to remove file extensions php from url using htacessremove php extension in filephp extension remove htaccessrewrite php extension htaccesshtaccess hide php and html extentionphp apache remove php from end of urlremove urls from string phpphp remove file extension from urlhow to remove php from url iisremove html extension phphtaccess remove html from urlhow to remove php extension from url in php using htaccesshtaccess hide file extension in urlremove php or html htaccesshow to remove html extension from url without htaccessphp remove a part from urlremove from url in php php remove urlphp include remove extensions at linksremove 2f from url phpphp how to get rid of php in the urlhtaccess to hide php extensionhide extensions php htaccesshow to revove the php extionremove extension at the end of url phphow to remove extensions from url using htaccessremove php from urlhow to remove php and html from urlremove extension phpphp remove extension from urlhtaccess remove html extensionphp 2c how to delete php in url adresshow to remove or hide php and html extension in website url using htaccessphp how to remove a websitehtaccess remove hide php htaccess remove all html and phpremove url 25 from text in phpremove php extension in urlremove phpremove php extensionhow to remove php from url in core phpdelete file extension in url htaccesshide html from urlrewritecond on don 27t show file extetionremvoe 25 in url php php url remove phphide php from url htaccessremove string from url phphow to remove php extension from urlhow to remove file extension name in phphtaccess remove phpremove php extension from url htaccess blocking login passwordhow to remove index php from urlhow do i remove a php extension from urlhide page extension in htmlhow to remove the php from urlremove fbclid from url phpphp url remove parameterremove php extension php htaccess hide extension phphow to remove php extension from url in localhostdelete parameter for php urlremove php or html hremove php from endinghow to remove localhost from url in phphow to remove string from url in phpdisable php extention phphow to hide the php extension in urlremove php extension from url apachehtaccess remove php extension from urldelete file php by urlhow to remove php extensions how to remove php in url in phphow to remove php from url in php without removing php from a linkhow to avoid use html extension from url without htaccesshow to remove www from url in phpremove parts of url in phpdisable php extension htaccessremove htm urlhow to remove php and html from domain htaccess htaccess file hide php extensionhow to remove php in url linkhow to remove php extension from url without htaccessphp delete get out of urlhow to remove file extension from file url in phphow to hide php extension in urlht access remove phpremove php from url httpddelete format php in urlphp remove 23 from urlwhat is rewriterule 5e 28 2a 29 24 241 phpremove php from url but still load if request has php htaccessremove php from url in phphow to remove php file extension from url barphp extension hide htaccessremove part of url phpdelete php in urlremove extension php htaccesshow to remove extension of file in php from url how to remove 2f from image url in phpremove php get data from urlhtacess get rid of file extensions htacess how to remove htmlhow to make php remove php from urlphp how to remove a parameter from urlhide html extension in url using htaccessremove php from url htaccessremove php extension htaccess articleremove php extension in url in phphtaccess remove html from html filesremove 25f url phphow to remove php from url in htaccessremove php in htaccesshtaccess remove html from urlhow to remove html extensionhtacess remove need of phphtaccess remove php from urlremove html extension from url with phpphp remove parameter from urlremove php extension from fileremove items from url phphow to remove php extension from urlphp remove extension from filenamehtaccess hide php extensionhow to remove php from urlhow to remove php html extensions with htaccessphp url remove specific attributeshide html extension htaccessremove php extension website htaccess remove php from single urlhtaccess remove file extentions htacces remove file extensionapache htaccess remove html extensionhtaccess php removehtaccess disable php extensionhtaccess file to remove phphow to create htaccess file to hide php extensionphp remove extensionhow to use htaccess to remove php extension from urldelete index php from urlphp remove path from urlread url and remove www from url phpturn off file extension htaccess htaccess to remove phphide php extension using htaccess htaccess remove php htaccess remove all html no redirecthow to remove php in url link html websiteremove url from string phphow to remove extension from url using htaccessremove php htaccessphp htaccess remove phpremove php htaccesshtaccess without php extensionremove php in linkremove extension from filename phpremove php and from urlhtaccess take off phpremove param url phpremove php from urlhow to remove part of url phpremove php from url htaccessdelete a word from url phphtaccess php file without extensionremoving file extensions using htaccessrermove php urlhtaccess remove hide phpremove php extension with htaccessphp file url delete getremove from url phpremove element from url phphow to remove 3f from url in phphtaccess no php extensionphp remove phphow to remove html extension from url using htaccessremove php extensionget rid of the php in a linkremove php exntension and call 2frun filehtaccess hide extensionphp remove domain from urlhide php extension in the htmlhtaccess remove file extension htaccess url no extensionremove php from url uesrremove php from url in subdomainhtaccess hide php extensionhow to remove base url in phphow to remove the php from url using fileshide url extension in phphtaccess remove phpremove html and php url extensionshow to remove extension in url html and php bothphp remove from urlhide php extension in url using htaccessremove folder from the url phphtaccess file without extensionhow to remove file extension from url in phphow to remove php from url in core php in folderremove php extension from url webslessonremove http from url phphow to hide php extension using htaccessphp remove string from urlremove php from urlremove www from url phphtaccess for rewrite rule for html to access php filephp remove url parameters from url stringremove extension from string phpremove php extension from url using htaccesshide php extention in htaccessphp api remove extensionremove php extentionremove php extension from urlphp delete url in stringremove html extensions htaccess rewrite htmlremove value after 3f from url in phpfunctions php delete home urlhow to hide php extension in url using htaccessremove extension at the end of link phpunlink httacessremove from domain phpremove php htaccessphp remove file extention from namephp url string remove specific attributeurl php removehtaccess no php neededremove php without htaccesshow to hide php extension using htaccess