.htaccess - Redirect on the basis of referer HTTP_REFERER htaccess -


i've issue want redirect user on basis of substring referered url, how can accomplish using htaccess?

  1. user on http://example.com/aqeel/videos/
  2. there hyperlink on above page http://demo.example.com/
  3. when user reaches http://demo.example.com/, want him redirected http://demo.example.com/login/aqeel/, here aqeel substring captured referer url in htaccess step 1 url.

thanks in advance,

you can use below code make work:

rewritecond %{http_referer} http\:\/\/example.com/([a-z]+)/videos/ rewriterule (.*)$ /login/%1/ 

i tried on domain.. , works... hope work you... :)


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -