我想要这个:
www.example.com/query/bla/anotherquery/bla2/thirdquery/bla3
并将其动态解释为:
www.example.com/index.php?query=bla&anotherquery=bla2&thirdquery=bla3
在带有mod-rewrite功能的httpd-vhost.conf中
<VirtualHost *:80>
DocumentRoot "/Users/me/Sites/Development"
ServerName development
RewriteEngine On
RewriteRule ?
</VirtualHost>
我也想http://www.example.com/index.php
解决http://www.example.com/
这可能吗?不安全吗 我该怎么做?我正在使用带有Apache的PHP和Mac本地服务器。
您可以在根.htaccess中使用此递归规则:
DirectoryIndex index.php
RewriteEngine On
RewriteBase /
RewriteRule ^([^/]+)/([^/]*)(/.*)?$ $3?$1=$2 [L,QSA]
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句