我像这样给了htaccess
Options +FollowSymlinks
RewriteEngine On
RewriteBase /xxx/folder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /xxx/folder/index.php [L]
RewriteRule ^(.*)$ index.php?page=$1 [L]
但是给这样的网址 http://domain.com/faq
我将页面变量作为index.php。我想在$ _GET ['page']中获取faq。我怎么能得到它?
答案 0 :(得分:0)
删除
RewriteBase /xxx/folder/
修改
RewriteRule ^(.*)$ index.php?page=$1 [L]
到
RewriteRule ^(.*)$ xxx/folder/index.php?page=$1 [L]