简体   繁体   中英

How can I remove .php extension while using ISPCONFIG 3?

I'd need to remove the.php extension from the browser, I used to do it from apache2.conf in the last server I was running the website on, but on this new one I need to use ISPCONFIG3 and I don't know how to use set it to remove the.php extension, since the website was already running on a server which was rewriting the extension the links in the html are all without.php which obviously causes on this new one that pages are not loaded. Many thanks in advance

You can solve this with mod_rewrite which is available by default in ISPconfig.

As admin you can add these RewriteRules on the Options tab of a web domain. But you can also store them in a .htaccess file together with the php files.

The needed rules are already explained nicely on put links without file extension (.php)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM