#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    293
    Rep Power
    12

    SOLVED: How do I direct request from a spesific host to one URL


    I want all requests from this host:
    blogxxx.wordpress.com
    to be directed to one spesific page (URL) on my site.

    How do I do that using
    RewriteCond (using REMOTE_HOST)
    RewriteRule

    I have tried using:

    Code:
    RewriteEngine On
    RewriteCond %{REMOTE_HOST} blogxxx\.wordpress\.com
    RewriteRule ^(.*)$ http://www.mydomain.com/pagex [L]
    But when I click a link on blogxx.wordpress.com site to my site, it does not work. It just show the page that the link points to, and not to the page I want the user directed to (according to the RewriteCond and RewriteRule).

    What am I doing wrong?

    FOUND the answer on this forum:
    This worked:

    Code:
    RewriteCond %{HTTP_REFERER} blogxxx.wordpress.com/(.*)?
    RewriteRule ^/?$ http://www.mydomain.com/pagex [R]
    Last edited by phpweb; June 18th, 2013 at 01:15 PM.
    BongoBongo

IMN logo majestic logo threadwatch logo seochat tools logo