.htaccess: RewriteEngine not allowed here

前端 未结 8 2056
醉话见心
醉话见心 2020-12-01 11:53

I uploaded the .htaccess to the server and received an Error 500 (Internal Server Error).

And in the error log I had the following error:

8条回答
  •  天涯浪人
    2020-12-01 12:26

    you could use something like this in your .htaccess file:

    RewriteEngine on
    RewriteCond $1 !^(index\.php|html|test)
    RewriteRule ^(.*)$ /index.php/$1 [L]
    

    this code simply means, that anything not pointing to index.php or html or test should be directed to index.php!

    Hope this is helpful!

提交回复
热议问题