Concerns with dynamic redirect

Discussion in 'Apache' started by phree_radical, Nov 22, 2006.

  1. #1
    I have a site (not live yet) that serves articles with PHP using parameters in the query string, like this:
    I would like to turn that URL into
    I know I can use .htaccess to rewrite the URL like so:
    Or something like that... I don't know the regex too well.

    My question is... won't rewriting that URL just redirect the end user's browser to /the-title, which doesn't exist? How do I do it correctly? And can it be done without writing a new rewriterule for each article?
     
    phree_radical, Nov 22, 2006 IP
  2. pulsa

    pulsa Peon

    Messages:
    66
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    pulsa, Nov 22, 2006 IP
    phree_radical likes this.
  3. phree_radical

    phree_radical Peon

    Messages:
    563
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That's wild! Thanks! And Google will index the-title?

    If it works just like it looks, then only apache knows the article.php url? :D

    If so, this clears up my confusion as to why the full URL was used when using .htaccess for redirect, even though it appeared only the filename from the request was coming in.

    With this method, it looks like anyone could put /anyoldthing-3 and get duplicate content for thetitle-3. Still I quest!
     
    phree_radical, Nov 22, 2006 IP