我要将localhost/website/index.php?pages=pages/login.php
重写为localhost/website/login
这是我的尝试,当我打开localhost/website/login
它说404没有找到
RewriteEngine On
RewriteBase /Domain/
#Make sure it's an actual file
RewriteCond %{REQUEST_FILENAME} -f [OR]
#Make sure its a directory
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
#Rewrite the request to index.php
RewriteRule ^([^/]+)/?$ index.php?pages=pages/$1 [NC,L,QSA]
1条答案
按热度按时间moiiocjp1#
你好,我不知道你到底想做什么,但试试这个