简体   繁体   English

mod_rewrite无法正常工作-持续出现500内部服务器错误

[英]mod_rewrite not working - keep getting 500 Internal Server Error

Environment: Apache 2.0.63 PHP 5.3.x. 环境:Apache 2.0.63 PHP5.3.x。

My website is www. 我的网站是www。 * **** .com/LandlordApp/index.php * **** .com / LandlordApp / index.php

I want to be able to redirect all traffic to index file? 我希望能够将所有流量重定向到索引文件?

I have tried the following, but constantly getting "500 Internal Server Error": 我尝试了以下操作,但是不断收到“ 500 Internal Server Error”:

<Directory /LandlordApp>
RewriteEngine On
RewriteBase /LandlordApp/
RewriteRule ^index.php$ 
</Directory>

All help is very welcome. 欢迎所有帮助。

Thank you 谢谢

I would put this in your LandlodApp directory 我将其放在您的LandlodApp目录中

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM