Redirect to a URL that has a Question Mark causes too many redirects
I have a domain for which I have enabled wildcard subdomains. Now I would
like to enable URL redirect as below:
http://xzy.mydomain.com/
To
http://xyz.mydomain.com/b3?domain=xyz?
I have added following entry in htaccess to enable redirect.
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.mydomain\.com
RewriteRule ^.*$ /q3?domain=%1? [R=301,L]
After reloading my apache when I browse URL:
I get following message:
The webpage at http://xyz.mydomain.com/q3?domain=xyz%3f has resulted in
too many redirects. Clearing your cookies for this site or allowing
third-party cookies may fix the problem. If not, it is possibly a server
configuration issue and not a problem with your computer.
I am getting %3f appended in the end of URL instead of ? question mark.
No comments:
Post a Comment