Modrewrite help??

Discussion in 'PHP' started by Neo_The_One, Oct 26, 2008.

  1. #1
    Hi,

    Guys, i need some help and i`m going to pay the guy that helps me a small fee + Positive feedback! ;)


    i would like to transform this to.

    www.siteurl.com/KeywordHere/3thKeyword.html
    PHP:
    and / or:

    [PHP]www.siteurl.com/3thKeyword.html
    PHP:
    [/PHP]

    I need the .htaccess file help.



    Thank You in advance... ! ;)
     
    Neo_The_One, Oct 26, 2008 IP
  2. Kyosys

    Kyosys Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    look into mod_rewrite
     
    Kyosys, Oct 26, 2008 IP
  3. Neo_The_One

    Neo_The_One Active Member

    Messages:
    555
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #3
    ^^

    Hi, i have but could`nt figure it out! ;/

    Thanks!
     
    Neo_The_One, Oct 26, 2008 IP
  4. SEOAnalytic.com

    SEOAnalytic.com Member

    Messages:
    106
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #4
    I think that should work.
    Example to access yoursite.com/file-name.php?seed=firstkeyword&expansion=secondkeyword&final=finalkeyword you should visit yoursite.com/firstkeyword/secondkeyword/finalkeyword.html
     
    SEOAnalytic.com, Oct 26, 2008 IP
  5. Kyosys

    Kyosys Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #5
    that only works if all parts are given, though


    RewriteRule ^/?(.+?)/(.+?).html$ file-name.php?seed=$1&final=$3 [NC,L]
    RewriteRule ^/?(.+?).html$ file-name.php?final=$3 [NC,L]

    add that
     
    Kyosys, Oct 26, 2008 IP
  6. logylaps

    logylaps Active Member

    Messages:
    761
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    85
    #6
    First of all, this is not possible unless your script is specifically made so it can figure out the first and second keywords from only the third one. If this is possible, for example, if the following url works
    then you can add this to your .htaccess file:
    PS. Hope that made sense... looking back it seems kinda... eh, whatever.
     
    logylaps, Oct 26, 2008 IP