I think this will be pretty easy for someone good with Regular Expressions. Unfortunately I am not such a person.
I am trying to use a RedirectMatch statement in my vhost.conf file to redirect certain calls to Apache.
All requests for:
Should get redirected to:
But requests that start:
Should not be redirected or else we will create an infinite loop.
So for example, if the original request is for:
It should be redirected to http://www.mydomain.com/mydomain/index.htm
But if the original request is for:
It should not be redirected.
I was trying things like:
RedirectMatch ^/mydomain(.*) http://www.mydomain.com/mydomain/$1
RedirectMatch ^[^/mydomain](.*) http://www.mydomain.com/mydomain/$1
I am trying to get the regex to say "if the path does not start with "/mydomain", then copy the path and redirect to "http://www.mydomain.com/mydomain/path
I hope I am explaining this ok! Thanks in advance for any help.