htaccess:RewriteRule:错误的标志分隔符,500内部服务器错误

我在.htaccess上有以下内容 .

RewriteOptions inherit
RewriteEngine on
RewriteCond %{HTTP_HOST} ^test\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.test\.net$
RewriteRule ^doc\/\/?(.*)$ "http\:\/\/dl\.test\.net\/doc\/$1" [R=301,L]

RewriteCond %{HTTP_HOST} ^test\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.test\.net$
RewriteRule ^upload\/\/?(.*)$ "http\:\/\/dl\.test\.net\/upload\/$1" [R=301,L]

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . "http\:\/\/dl\.test\.net\/wp-content/uploads\/".{REQUEST_FILENAME} [L,R=301]

# BEGIN WordPress

# END WordPress

RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^welayah\/\/?(.*)$ "http\:\/\/test\.net\/$1" [R=301,L]
RewriteCond %{HTTP_HOST} ^test\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.test\.net$
RewriteRule ^up\/\/?(.*)$ "http\:\/\/dl\.test\.net\/up\/$1" [R=301,L]


<Files 403.shtml>
order allow,deny
allow from all
</Files>

deny from 176.9.109.114

网站显示500内部服务器错误 . 关于apache错误日志

.htaccess:RewriteRule:坏标记分隔符

寻求帮助 .

回答(1)

3 years ago

尝试删除第一个 . 在RewriteRule命令之后 .

RewriteRule“http://dl.test.net/wp-content/uploads/". [L,R = 301]