Apache MatchRedirect exception regex

Posted by Arash Mousavi on Server Fault See other posts from Server Fault or by Arash Mousavi
Published on 2013-07-31T11:04:29Z Indexed on 2013/08/02 15:41 UTC
Read the original article Hit count: 428

I want to redirect any URL that is Https and hasn't start with "system_" to the same URL with http.

for exapmle for this url :

https://exsite.tld/some/thing/that/not/start/with/pattern

to :

http://exsite.tld/some/thing/that/not/start/with/pattern

but this url:

https://exsite.tld/system_aas3f4

Shouldn't redirect.

I try:

  RedirectMatch  ^/?((?!(system_)).*)  http://exsite.tld/$1

but it won't work. I don't know what's the problem.

© Server Fault or respective owner

Related posts about apache2

Related posts about redirect