1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need help rewriting URL's (Using htaccess) for PPC

Discussion in 'Cloaking and Content Generators' started by trioreal, Mar 18, 2010.

  1. trioreal

    trioreal Regular Member

    Joined:
    Jan 15, 2009
    Messages:
    230
    Likes Received:
    52
    Hi,

    I'm trying to rewrite dynamic URL's to virtual .html URLs but can' figure it out..

    example:

    Code:

    Code:
    http:///www.example.com/sub/index.html?keyword=var1 var2 var3
    to

    Code:

    Code:
    http:///www.example.com/sub/var1-var2-var3.html
    There could be more than 3 variables or less...

    any idea?
     
  2. yeahright

    yeahright Registered Member

    Joined:
    Jan 17, 2009
    Messages:
    93
    Likes Received:
    32
  3. WorkingDog

    WorkingDog Newbie

    Joined:
    Mar 8, 2010
    Messages:
    15
    Likes Received:
    13
    If you want a long term reference that you can use over and over for all sorts of rewrites, invest in a decent book. I constantly refer to "The Definitive Guide to Apache mod_rewrite" by Rich Bowen to make sure I get things right. It's paid for my investment many times over.

    Also make sure you test your rewrites well - you can easily stuff it up and cause yourself a heap of drama and damage your SE position. Rewrites can be a PITA to debug, especially if you have a regualr expression error or a loop. Two tools that help are RegexBuddy (http://www.regexbuddy.com/) to check your regular expressions and Web Sniffer (http://web-sniffer.net/) to see what rewrite URL actually gets sent to the browser.
     
  4. al8xandru

    al8xandru Newbie

    Joined:
    Mar 23, 2010
    Messages:
    14
    Likes Received:
    2
    Home Page:
    Code:
    ReWriteRule ^sub/(.*)-(.*)-(.*).html$ sub/index.html?keyword=$1 $2 $3
    This wont work because of the malformed url and I an not rly sure that the rewrite is correct, but it should give you an ideea.
     
  5. joelcommisafag

    joelcommisafag Newbie

    Joined:
    Nov 25, 2007
    Messages:
    32
    Likes Received:
    22
    Occupation:
    Ninja Marketer
    Location:
    SFO
    I've got a url rewrite question. I've got a ton of outbound links on my site that would take forever to manually edit. I want to blank the referrer to these outbound links using the blanking server https://referer.us

    How can I use .htaccess to prepend http://referer.us to all my outbound links so that all m referers are blanked?

    Thanks.
     
  6. Tseng

    Tseng Regular Member

    Joined:
    Mar 16, 2010
    Messages:
    289
    Likes Received:
    33
    Occupation:
    lampin
    Location:
    outerspace
    I am not sure on how to do it via your .htaccess file, but I have a plug-in that allows you to add links to words (specified by you) automatically.

    Not sure if this will help you, PM me if you want to know more.