3
我想创建假目录重定向特定的参数到特定的子目录,如: 从:www.example.com/sys/signup 收件人:www.example.com/ ?系统/ ext.php T =注册Mod重写Htaccess假冒子目录和目录
我想创建假目录重定向特定的参数到特定的子目录,如: 从:www.example.com/sys/signup 收件人:www.example.com/ ?系统/ ext.php T =注册Mod重写Htaccess假冒子目录和目录
您需要在浏览器从查询字符串到一个没有URL重定向,那么你就需要在内部重写URL 回到一个查询字符串:
RewriteEngine On
# redirect the browser to clean URL
RewriteCond %{THE_REQUEST} \ /+system/ext\.php\?t=([^&]+)
RewriteRule^/sys/%1? [L,R]
# internally rewrite back to the query string
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^sys/(.*)$ /system/ext.php?t=$1 [L,QSA]