My htaccess RewriteRule works on localhost/mysite but not at mysite.com on a 1&1 shared host

前端 未结 3 1879
情深已故
情深已故 2021-01-19 09:55

Solved:

unfortunately, the solution is not a satisfying one. This morning, when trying @Wige\'s Suggestion, I found, to my suprise, that the Expected value

相关标签:
3条回答
  • 2021-01-19 10:34

    Most likely, your host is storing the variables somewhere else. I would add a call to phpinfo(); into your script and go through the environment variables there to see if you can find the values that should have been in get.

    0 讨论(0)
  • 2021-01-19 10:41

    Seems to be connected to 1&1's hosting environment.

    See this question, in particular, this answer.

    Basically it appears that 1&1 enable "MultiViews". By adding

    Options -MultiViews
    

    You disable that setting for your website and according to various reports, this resolves the issue.

    0 讨论(0)
  • 2021-01-19 10:42

    I struggled with RewriteRule issues on a 1&1 / 1and1 / IONOS shared server for WEEKS and eventually I found the perfect setup for a 1 and 1 shared server, start your .htaccess file like this

    Options -MultiViews
    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /
    

    I hope this helps someone as 1&1 are useless when it comes to htaccess support

    0 讨论(0)
提交回复
热议问题