0
我有一個像網址:刪除PHP擴展的.htaccess
http://exploreinfo/controller/register.php?key=hjgsaf1
,我想要的網址,如:
http://exploreinfo/controller/register/?key=hjgsaf1
如何與上面的格式刪除PHP在PHP
我有一個像網址:刪除PHP擴展的.htaccess
http://exploreinfo/controller/register.php?key=hjgsaf1
,我想要的網址,如:
http://exploreinfo/controller/register/?key=hjgsaf1
如何與上面的格式刪除PHP在PHP
使用.htaccess
創建一個.htaccess文件或使用Apache重寫:http://httpd.apache.org/docs/current/mod/mod_rewrite.html
規則是:
RewriteEngine On
RewriteRule ^register/$ register.php [QSA]
[如何刪除與htaccess的PHP的擴展](http://alexcican.com/post/how-to-remove-php-html-htm-extensions-with-htaccess/ ) – 2015-01-26 20:03:40
在[google](https://www.google.ro/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=htaccess%20remove%20.php)上快速搜索會返回大量文章如何做到這一點? – Bogdan 2015-01-26 20:04:05