HTACCESS在本地运行,而不在服务器上运行

时间:2020-04-29 21:43:12

标签: php .htaccess web server localhost

我的代码在localhost中工作正常,但是当我将其上载到域时,出现错误500(有时为空白页) 任何建议,请! 我的htaccess:

enter code here

RewriteEngine开启

RewriteCond $ 1!^(index.php | images | robots.txt)

RewriteCond%{REQUEST_FILENAME}!-f

RewriteCond%{REQUEST_FILENAME}!-d

RewriteRule ^(。*)$ index.php / $ 1 [L]

1 个答案:

答案 0 :(得分:0)

确保在您的apache配置中启用了RewriteEngine 我认为此链接将有助于解决您的问题https://hostadvice.com/how-to/how-to-enable-apache-mod_rewrite-on-an-ubuntu-18-04-vps-or-dedicated-server/