homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

re: htaccess and GET $
htaccess , ge t url varibles , redirect.

Msg#: 4255566 posted 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......



Msg#: 4255566 posted 11:16 am on Jan 21, 2011 (gmt 0)

i am waiting for reply


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

Msg#: 4255566 posted 10:31 pm on Jan 24, 2011 (gmt 0)

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.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved