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