Wednesday 15 July 2015

.htaccess - HT Access removing .php extension conflicts with custom error page -


I am currently using in my htaccess file so that .php extension is not shown in the URL. It works fine. RewriteRule ^ (. *) $$ 1.php

On the rewrite engine I have to change the default 404 error page to a custom one. error document 404 /my_site/public/custom404.php

The problem coming here is that the code above works only if the rewrite rules file Why any idea has been removed?

Write again with the rule to:

  RewriteCond% {REQUEST_URI}! \. [A-z0- 9] + $ [NC] rewrite rule ^ (. *?) /? $ $ 1.php [L, QSA]    

No comments:

Post a Comment