What rule should I write for redirection in htaccess so that
http://abc.com/http://xyz.com/path/ redirects to http://xyz.com/path/
but
http://abc.com/?url=http://xyz.com/path/ should not redirect
Thanks,
Loveleen
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Important thing to remember for this kind of redirection is that Apache strips out all multiple slashes in RewriteRule match. For this reason it is better to use variable
%{THE_REQUEST}which remains “as is”. SO just use this code in your .htaccess under DOCUMENT_ROOT directory: