0

I have the following url:

http://example.com/directory/[email protected]&link=http://example.org

The value in the "link" variable will always have http:// or https:// and i would like to strip it from the url.

So I would end up with:

http://example.com/directory/[email protected]&link=example.org

1
  • does the code below answer your question? Commented Jun 19, 2013 at 20:51

1 Answer 1

1
RewriteEngine on
RewriteCond %{QUERY_STRING} ^((.+&)?link=)(https?://)(.+)$
RewriteRule (.*) /$1?%1%4 [NC,L,R]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.