.htaccess Rewrite

Discussion in 'White Hat SEO' started by undeterminederror, Jul 10, 2008.

  1. undeterminederror

    undeterminederror BANNED BANNED

    Joined:
    Mar 31, 2008
    Messages:
    630
    Likes Received:
    457
    I use mod rewrite like this:
    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www.MY_SITE.com
    RewriteCond %{HTTP_HOST} ([^.]+).MY-SITE.com
    RewriteRule ^(.*)$ http://MY-SITE.com/index.php?category_name=%1
    its a wordpress blog and i have enabled the wildcards.

    so it redirect ANYTHING.MY-SITE.com to MY-SITE.com/index.php?category_name=ANYTHING , ANYTHING being a category.

    I need the browser to show the subdomain, not to redirect to the long url. Something like cloaking. Anyone has a clue about this?
     
  2. michaelnagy

    michaelnagy Registered Member

    Joined:
    Apr 8, 2010
    Messages:
    55
    Likes Received:
    2
    I'm trying to do somethin like this...but my host don't even support wildcards...now i'm searching for a good host to migrate...any ideas??