Why is my .htaccess file redirecting to full server path instead of relative path?

前端 未结 3 1188
别跟我提以往
别跟我提以往 2021-01-19 12:18

I\'ve never had a problem with cakePHP before, but something\'s odd about this server and is causing the redirects in the .htaccess files to behave oddly.

CakePHP us

3条回答
  •  灰色年华
    2021-01-19 13:01

    It was quite simple (using uolhost shared host):

    Edit both .htaccess files:

    /webroot/.htaccess

    /.htaccess

    Add the following line: RewriteBase /

    Here is the whole /webroot/.htaccess file:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
    

提交回复
热议问题