我需要一个像:
这样的请求www.mydomain.com/books/catalog.html?param1=abc¶m2=123param3=etc
内部重写,以便从:
提供内容www.mydomain.com/index.php?page=books/catalog.html¶m1=abc¶m2=123¶m3=etc
答案 0 :(得分:1)
将此代码放入DOCUMENT_ROOT/.htaccess
文件中:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ /index.php?page=$1 [L,QSA]