The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

stuck on mod_rewrite..

Discussion in 'General Discussion' started by nickn, Mar 15, 2004.

  1. nickn

    nickn Well-Known Member
    PartnerNOC

    Joined:
    Jun 15, 2003
    Messages:
    619
    Likes Received:
    1
    Trophy Points:
    18
    Hey folks,

    This isn't exactly cpanel related, but I'm working on making cPanelFAQ.org SEO friendly, and part of that is getting rid of the dynamic URLs, anyhow, I'm running into this issue:

    I am trying to get this URL:
    http://www.cpanelfaq.org/004/4.html

    To rewrite into..
    http://www.cPanelFAQ.org/index.php?aktion=artikel&rubrik=[/url]$1&id=$2&lang=en

    This is the rewrite rule I have, that I can't get ti work :

    Code:
    RewriteEngine On
    RewriteRule ^/[0-9]+/[0-9]+\.html$ /index.php?aktion=artikel&rubrik=$1&id=$2 [L,R]
    
    Any ideas?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You've got some brackets missing for $1 and $2 to map to. Haven't tested it, but this may work:

    Code:
    RewriteEngine On
    RewriteRule ^/([0-9]+)/([0-9]+)\.html$ /index.php?aktion=artikel&rubrik=$1&id=$2 [L,R]
    
     
  3. nickn

    nickn Well-Known Member
    PartnerNOC

    Joined:
    Jun 15, 2003
    Messages:
    619
    Likes Received:
    1
    Trophy Points:
    18
    D'oh you're right..I did forget that, but it's still not working..*ponders*
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
  5. nickn

    nickn Well-Known Member
    PartnerNOC

    Joined:
    Jun 15, 2003
    Messages:
    619
    Likes Received:
    1
    Trophy Points:
    18
    Yeah. I'm checking logs right now, verified it with some guys in #apache on freenode.net (the semi official help chan) they all say it looks correct..so heh. not sure..

    I'll figure it out, I knew my regex were better than taht.
     
Loading...

Share This Page