htaccess rewrite help . . .

Discussion in 'HTML & Website Design' started by locals, Oct 8, 2008.

  1. #1
    THIS ONE IS THE ONE I NEED TO WORK. . . .
    =======================================================
    RewriteEngine on
    RewriteBase /personal_quotes/
    RewriteRule ^index\.html$ /index\.php
    RewriteRule ^view-(.*)-(.*).html /viewquotes.php?title=$1&id=$2
    RewriteRule ^quote-archives-(.*)-(.*)-(.*).html /quote-archives.php?cat_name=$1&cat_id=$2&start=$3
    RewriteRule ^links(.*).html /links.php?start=$1
    RewriteRule ^help\.html$ /help\.php
    RewriteRule ^links\.html$ /links\.php
    RewriteRule ^privacy\.html$ /privacy\.php
    RewriteRule ^refer_to_friend\.html$ /refer_to_friend\.php
    RewriteRule ^feedback\.html$ /feedback\.php
    RewriteRule ^disclaimer\.html$ /disclaimer\.php
    ========================================================



    This is the one i use for a different script that does work but i dont understand all the ([^/]+)/ which i am sure why this one works and the other one doesnt . ..

    RewriteEngine On
    RewriteBase /personal_quotes/

    RewriteRule ^page/([^/]+)/?$ index.php?page=$1 [L]
    RewriteRule ^tag/([^/]+)/?$ index.php?tag=$1 [L]
    RewriteRule ^tag/([^/]+)/page/([^/]+)/?$ index.php?tag=$1&page=$2 [L]
    RewriteRule ^search/([^/]+)/page/([^/]+)/?$ index.php?action=search&keyword=$1&page=$2 [L]
    RewriteRule ^comment/?$ comment.php [L]
    RewriteRule ^rss/?$ rss.php [L]
    RewriteRule ^rss/time/([^/]+)?$ rss.php?time=$1 [L]
    RewriteRule ^suggest/?$ suggest.php [L]
    RewriteRule ^term/?$ term.php [L]
    RewriteRule ^advertising/?$ advertising.php
    RewriteRule ^privacy/?$ privacy.php [L]
    RewriteRule ^view/([^/]+)/?$ view.php?title=$1 [L]
    ========================================================

    THANKS FOR ALL YOUR HELP !
     
    locals, Oct 8, 2008 IP