Totally ****** up , Pls help

Discussion in 'Apache' started by sarathy, Oct 6, 2006.

  1. #1
    Hi guyz,
    our programmers are trying to rewrite the following.,

    1.
    mydomain.com/sitemap/1.php?t=Friendship&g=Female
    mydomain.com/sitemap/1.php?t=Marriage&g=Female

    to:
    mydomain.com/sitemap/friendship/female
    mydomain.com/sitemap/marriage/female

    2.
    mydomain.com/sitemap/1.php?t=Friendship&g=Female&page=1
    mydomain.com/sitemap/1.php?t=Marriage&g=Female&page=1
    to:
    mydomain.com/sitemap/marriage/female/1
    3.
    mydomain.com/sitemap/2.php?SMS=MonoTones
    mydomain.com/sitemap/monotones
    4.
    mydomain.com/sitemap/2.php?SMS=MonoTones&page=1
    mydomain.com/sitemap/monotones/1
    5.
    mydomain.com/sitemap/2.php?SMS=MonoTones&subcat=All-Time-Favorite
    mydomain.com/sitemap/monotones/all-time-favorite
    6.
    mydomain.com/sitemap/2.php?SMS=MonoTones&subcat=All-Time-Favorite&page=1
    mydomain.com/sitemap/monotones/all-time-favorite/1

    since the urls are identical its very tough to rewrite, Is there anyway that we can do without any clash

    Please help with any suggestions
    Thank you
     
    sarathy, Oct 6, 2006 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Make it so there not identical. The same type of URL can't point to two different places.

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^sitemap/([^.]+)/g/([^.]+)/([^.]+)/$ sitemap/1.php?t=$1&g=$2&page=$3 [L]
    RewriteRule ^sitemap/([^.]+)/sub/([^.]+)/([^.]+)/$ sitemap/2.php?SMS=$1&subcat=$2&page=$3 [L]
    RewriteRule ^sitemap/([^.]+)/sub/([^.]+)/$ sitemap/2.php?SMS=$1&subcat=$2 [L]
    RewriteRule ^sitemap/([^.]+)/([^.]+)$ sitemap/2.php?SMS=$1&page=$2 [L]
    RewriteRule ^sitemap/([^.]+)$ sitemap/2.php?SMS=$1 [L]
     
    Nintendo, Oct 6, 2006 IP
  3. sarathy

    sarathy Peon

    Messages:
    1,613
    Likes Received:
    76
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks nintendo, I have included the dynamic parameters into the url ., Now it seems to work :)
     
    sarathy, Oct 8, 2006 IP