1and1 mod_rewrite 问题
我目前正在尝试让我的 1and1 托管一个启用了 mod_rewrite 的 .htaccess 文件,它可以在我的本地 wamp 上运行,但不能在服务器上运行,
任何帮助将不胜感激!
我已经尝试删除除 mod_rewrite 块之外的所有内容,但问题仍然存在...
我已向 1&1 寻求支持,他们在没有回答的情况下关闭了我的票证... o_O,
请帮忙!
.htaccess 文件:
#
# Dream Forgery Settings:
#
AddType x-mapp-php5 .php
RewriteEngine on
RewriteBase /
# Rewrite current-style URLs of the form 'strap.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /strap.php?q=$1 [L,QSA]
编辑:
我无权访问 apache 日志,因为这是共享托管,但预期的功能是重定向 url,例如:
http://example.com/arg1/arg2/arg3
到
http://example.com/strap.php?q=arg1/arg2/arg3
(当前给出 404 错误,仅显示 1&1 中的 404 页面)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在这里找到答案:
添加以下内容修复了 mod-rewrite:
http://www.techpopuli .net/news/04/002289.html
Found the answer here:
Adding the following fixed the mod-rewrite:
http://www.techpopuli.net/news/04/002289.html
删除除重要部分以外的所有内容......
然后看看会发生什么。文件的其余部分不是必需的——这将[希望]隔离问题。和 1 & 1 支持.htaccess。
Delete everything but the important bits...
...and see what happens. The rest of the file isn't necessary—this'll [hopefully] isolate the problem. And 1 & 1 supports .htaccess.
在 1and1 的共同网络托管上遇到了类似的问题。
症状:
Joomla 3.9 附带了一个 .htaccess (在根目录中),它在第 69 行搞砸了:
注释这一行可以解决问题。
Ran into a similar issue on a mutualised web hosting from 1and1.
Symptoms:
Joomla 3.9 comes with a .htaccess (in the root directory) that messed it up at line 69:
Commenting this line does the trick.