Help with url rewrite

Discussion in 'Apache' started by itssangy, Jan 4, 2008.

  1. #1
    Hi guys,

    here's what i'm using in my .htaccess file:
    
    Options +FollowSymLinks
    RewriteEngine On
    
    RewriteRule ^([A-Za-z0-9-]+)/?$ index.php?pagename=$1 [NC,QSA]
    RewriteRule ^([A-Za-z0-9-]+)/([0-9-]+)/?$ index.php?pagename=$1&offset=$2 [L,NC,QSA]
    RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ index.php?pagename=$1&offset=$2&topic=$3 [NC,QSA]
    
    Code (markup):
    basically my site will have an index file with:


    index.php?pagename=nameofpage&offset=pagenumber&topic=article

    offset will change as people navigate across the page to older articles.

    could someone look at my RewriteRule and let me know if there's any problem?

    thanks
     
    itssangy, Jan 4, 2008 IP