Php 如何写htaccess
我想要一个htaccess,可以将其更改为 它还应该保持查询的完整性,以便我可以在页面中使用它使用它并享受:Php 如何写htaccess,php,jquery,Php,Jquery,我想要一个htaccess,可以将其更改为 它还应该保持查询的完整性,以便我可以在页面中使用它使用它并享受: RewriteEngine On RewriteBase / # Redirect /index?id=2 to /index/2 RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\?id=([^&\s]+) [NC] RewriteRule ^ /index?%1 [R=302,L] RewriteCond %{REQUEST_F
RewriteEngine On
RewriteBase /
# Redirect /index?id=2 to /index/2
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\?id=([^&\s]+) [NC]
RewriteRule ^ /index?%1 [R=302,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [QSA,L]
在我看来,您似乎想要隐藏参数。你不应该考虑发布你的参数而不是使用GET吗?这不是OP要求的。似乎他想隐藏所有参数,而不仅仅是将它们更改为看起来像子文件夹的结构。。。