.htaccess:RewriteCond:错误的标志分隔符-Apache错误

时间:2019-01-10 08:11:32

标签: php apache .htaccess codeigniter

这是我的.htaccess:

AddType application/x-httpd-php56 php56 php

ErrorDocument 404 /404.php
#php_value error_reporting 8

<IfModule mod_rewrite.c>

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com/old$ [NC]
RewriteRule ^(.*)$ http://www.example.com/old/$1 [R=301,L]

RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(/)?$ cmsfolder/index.php [L]Options +Indexes
# RewriteRule ^(?!404\.php)$ - [L,NC,R=404]
RewriteCond %{REQUEST_METHOD} OPTIONS RewriteRule ^(.*)$ $1 [R=200,L]



</IfModule>

order allow,deny
allow from all

RewriteCond %{HTTP_HOST} ^example\.ir$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.ir$
RewriteRule ^/?$ "http\:\/\/www\.example\.com" [R=301,L]

RewriteCond %{REQUEST_URI} !^/$  [NC]
<Files 403.shtml>
order allow,deny
allow from all
</Files>

我从apache错误日志中得到了这个错误:

[Thu Jan 10 11:39:07.445956 2019] [core:alert] [pid 11045] [client] /home/***/public_html/old/.htaccess: RewriteCond: bad flag delimiters

0 个答案:

没有答案