Help Mod_write...page is not working

Discuss practical ways rearrange URLs using mod_rewrite.

Help Mod_write...page is not working

Postby celebritywallpaper.us » Wed Jul 16, 2008 6:23 am

Hi

I got this

Code: Select all
RewriteRule ^play_(.*)_online.html game.php?f=$1
RewriteRule ^free_(.*)_latestgames.html browse.php?c=$1&orderby=latest
RewriteRule ^free_(.*)_games.html browse.php?c=$1
RewriteRule ^free_(.*)_(.*)games.html browse.php?c=$1&letter=$2
RewriteRule ^profile/(.*).html profile.php?u=$1
RewriteRule ^page/([0-9]+).html /page.php?p=$1 [L]


everything seen working fine, However when i click on the second page is not working and display like this
http://www.mydomain.com/free_hello_games.html/2.html


how can i move /2.html into the url so look like this
http://www.mydomain.com/free_hello_games_2.html



Thanks advance
celebritywallpaper.us
 
Posts: 41
Joined: Sat Feb 03, 2007 6:27 am

Postby richardk » Thu Jul 17, 2008 1:05 pm

You need a new RewriteRule
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^play_(.+)_online\.html$         /game.php?f=$1                  [QSA,L]
RewriteRule ^free_(.+)_latestgames\.html$    /browse.php?c=$1&orderby=latest [QSA,L]
RewriteRule ^free_(.+)_games\.html$          /browse.php?c=$1                [QSA,L]
RewriteRule ^free_(.+)_games_([0-9]+)\.html$ /browse.php?c=$1&p=$2           [QSA,L]
RewriteRule ^free_(.+)_(.+)games\.html$      /browse.php?c=$1&letter=$2      [QSA,L]
RewriteRule ^profile/(.+)\.html$             /profile.php?u=$1               [QSA,L]
RewriteRule ^page/([0-9]+)\.html$            /page.php?p=$1                  [QSA,L]

This will not change how the link is outputted by your script, though.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 116 guests

cron