【发布时间】:2021-02-28 05:58:58
【问题描述】:
我正在尝试使用 .htaccess RewriteRule 简化我的网址,但我没有成功。
我希望 http://localhost/site/auth 中的 url 与 http://localhost/auth 一样,我想从 url 中删除 site。
到目前为止我尝试了什么
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite --- http://localhost/site/auth => http://localhost/auth
RewriteRule ^site/auth$ /auth?&%{QUERY_STRING}
</IfModule>
【问题讨论】:
标签: apache .htaccess codeigniter