【问题标题】:Why is my service provider limiting my htacess use?为什么我的服务提供商限制我使用 htaccess?
【发布时间】:2015-07-14 11:43:55
【问题描述】:

在这个过程中让我的生活变得更加困难?

Bluehost 不让我使用

# no access to this it seems
#DocumentRoot /public_html

# access to this however
#DirectoryIndex

他们的文档说我需要使用

# change the document root using rewrite rules per bluehost document
#RewriteEngine on
#RewriteCond %{HTTP_HOST} ^(www.)?foo.com$
#RewriteCond %{REQUEST_URI} !^/web/
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)$ /web/$1
#RewriteCond %{HTTP_HOST} ^(www.)?foo.com$
#RewriteRule ^(/)?$ web/index.php [L] 

【问题讨论】:

    标签: apache server silex


    【解决方案1】:

    我之前遇到过这个问题,但看起来他们已经更新了访问权限,以便您可以使用DirecotryIndex

    请参阅 Bluehost 文档here.

    对于DocumentRoot,他们可以解决here

    您的 Web 框架列出了另一个解决方案 here

    <IfModule mod_rewrite.c>
        Options -MultiViews
        RewriteEngine On
        #RewriteBase /path/to/app
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [QSA,L]
    </IfModule>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-08
      • 2022-08-04
      • 2017-03-25
      • 2011-01-12
      • 1970-01-01
      • 1970-01-01
      • 2017-02-23
      • 1970-01-01
      相关资源
      最近更新 更多