Solved

|EASY| Redirect base on referer in .htaccess

Posted on 2008-10-23
2
298 Views
Last Modified: 2012-05-05
I want to redirect people coming from
e.g
http://www.xxx.com/anything.anything
http://xxx.com/anything.anything

to www.google.com
but its not working..
any problem??


RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://www.xxx.com [NC]
RewriteRule http://www.google.com [NC]
0
Comment
Question by:royalgoldleaf
2 Comments
 
LVL 9

Expert Comment

by:mgonullu
ID: 22787655
0
 
LVL 27

Accepted Solution

by:
caterham_www earned 500 total points
ID: 22800556
Your rule-pattern is missing
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(www)?\.xxx\.com [NC]
RewriteRule ^  http://www.google.com

Open in new window

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to count occurrences of each item in an array.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question