【发布时间】:2016-02-01 08:17:11
【问题描述】:
我正面临 apache 重写规则的问题。我期待以下结果
If URL is
http://www.mysite.co/testWeb/query1/guery2/3
Then Result
http://www.mysite.co/testWeb/index.html/#/query1/guery2/3
(index.html/# - 必须在 URL 中添加,路径包含 testWeb)
我添加的规则如下
RewriteEngine On
RewriteRule ^testWeb/(.*)$ http://%{HTTP_HOST}/testWeb/index.html/#/$1 [L]
此规则在重写规则在线测试器中运行良好。但不在我的 apache 中。有什么想法吗?
【问题讨论】:
-
发生了什么?
-
“不工作”究竟是什么意思?
-
.htaccess样式文件的解释必须首先在 http 服务器主机配置中启用。原因是这些文件确实会降低服务器速度,因此默认情况下它们是停用的。
标签: apache .htaccess mod-rewrite url-rewriting