Welcome to WebmasterWorld Guest from 54.162.240.235

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

re: htaccess and GET $

htaccess , ge t url varibles , redirect.

     
5:50 am on Jan 20, 2011 (gmt 0)



dear all , please help me ,

this is part of my htaccess file


RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /browse\.php\?fatherID=([^&]+)&pageNum=([^&]+)\ HTTP/
RewriteRule ^browse\.php$ [domain.com...] [R=301,L]


RewriteRule ^classifieds-([^/]+)-([^/]+)\.html$ /browse.php?fatherID=$1&pageNum=$2 [L]


this is working correctly but

i need to show echo $_GET['pageNum'] this variable on page , it is not show any values , blank ?

but $_GET['fatherID'] this variable show its correct value , i am confusing , is it conflict with other redirect orr......
11:16 am on Jan 21, 2011 (gmt 0)



i am waiting for reply
10:31 pm on Jan 24, 2011 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



The code could be made more robust and more efficient:

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /browse\.php\?fatherID=([^&]+)&pageNum=([^&\ ]+)\ HTTP/
RewriteRule ^browse\.php$ http://www.example.com/classifieds-%1-%2\.html? [R=301,L]
#
RewriteRule ^classifieds-([^/-]+)-([^/.]+)\.html$ /browse.php?fatherID=$1&pageNum=$2 [L]

However, your original code should have worked... Are you sure you deleted your browser cache before testing it?

Please specify the URL(s) you tested with in all problem-report posts.

Jim
 

Featured Threads

Hot Threads This Week

Hot Threads This Month