How do I redirect to my same URL without getting a too many redirects error?
I need to redirect users from http://myurl.com/Login.action to http://myurl.com/app/Login.action
I tried this but I get an error saying I get too many redirects.
RedirectMatch ([A-Za-z]*)\.action$ http://myurl.com/app/$1.action
How can I get apache to redirect to the same URL but only redirect once.
Would something like this work?
RedirectMatch ![app\/]([A-Za-z]*)\.action$ http://myurl.c开发者_运维问答om/app/$1.action
your regular expression matches both urls, so you're redirecting in an infinite loop.
Try something like this:
RedirectMatch ^([^\/]+?\.action)$ http://myurl.com/app/$1
Rob, thanks for your guidance. I modified yours a bit and this is what I came up with.
RedirectMatch ^\/([A-Za-z]+\.action)$ http://myurl.com/app/$1
精彩评论