remove http:// from url query parameter

New to mod_rewrite? This is a good place to start.

remove http:// from url query parameter

Postby BMN » Fri Feb 17, 2012 12:24 pm

Hello!

I want to ask you if it is possible with .htaccess to remove "http://" from url query parameter. What I mean is that I have website http://MyWebsite.com and I am passing a url query parameter on two of the pages like this http://MyWebsite.com/Page/?url=www.AnotherWebsite.com. It is wordpress website and it doesn't allow me to pass parameter with "http://" in it. It simply doesn't work then. I try to reassure that such a parameter will never be pass, but it's pain in the ass and I simply can't be 100% sure. Is it possble to remove "http://" from parameter if existing with mod rewrite? So that it would redirect http://MyWebsite.com/Page/?url=http://w ... ebsite.com to http://MyWebsite.com/Page/?url=www.AnotherWebsite.com and not doing anything if http in parameter doesn't exist.

Regards,
BMN
BMN
 
Posts: 39
Joined: Wed Jul 05, 2006 2:15 am

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 7 guests

cron