【发布时间】:2016-08-09 09:38:13
【问题描述】:
我想从 nginx 迁移到 apache2。但我不知道如何将 nginx 重写规则“转换”为 apache/htaccess 重写规则。
location / {
try_files $uri $uri/ /index.php;
if ($uri ~* ^/([a-z]+)$) {
set $page_to_view "/index.php?p=$1";
rewrite ^/([a-z]+)$ /index.php?p=$1 last;
}
}
谢谢! =)
【问题讨论】:
标签: apache .htaccess mod-rewrite nginx url-rewriting