0

I have below content on .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

Website is showing 500 internal server error. On apache error log

.htaccess: RewriteRule: bad flag delimiters

Looking for help.

Arvin
  • 33
  • 7
  • [Here are some tips](http://stackoverflow.com/questions/9153262/tips-for-debugging-htaccess-rewrite-rules) for debugging your htaccess. And here's the same error in [one question](http://stackoverflow.com/questions/4627945/rewrite-rule-for-user-agent-with-mod-rewrite) and on [another question](http://stackoverflow.com/questions/8717969/apache-rewriterule-bad-flag-delimiters). I am not sure if you need the `"` in the RewriteRules, but try to remove them... – Armfoot Oct 01 '15 at 10:47

1 Answers1

0

Try removing the first . after RewriteRule command.

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

aarpey
  • 158
  • 1
  • 3
  • 15