htaccess适用于本地服务器和开发,不适用于Godaddy服务器

时间:2016-08-24 13:53:51

标签: php apache .htaccess mod-rewrite

我在本地和开发服务器中使用以下.htaccess文件,但是当我将此.htaccess文件部署到我的godaddy prod服务器时,出现500错误。但是,如果我浏览到http://example.com/bootstrap.php,我会在/

获得404资源

我的目录结构是:

+ folder
+--folder of errord domain

# this funnels every request through the bootstrap unless the request includes a specific file or document
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /
  RewriteCond %{REQUEST_URI} !(js|css|errors|images|fonts|media)
  RewriteRule !.(js|css|ico|gif|jpg|png|swf|ttf|eot|svg|woff|GIF|pdf)$ bootstrap.php
  RewriteCond %{REQUEST_FILENAME} -s [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^.*$ - [NC,L]
  RewriteRule ^.*$ bootstrap.php [NC,L]
</IfModule>

0 个答案:

没有答案