goocharlton Posted October 2, 2008 Share Posted October 2, 2008 I have a website that I am trying to get URL rewriting working on it. This scenario is as follows: The URL in the browser shows .../page/1 and is interpreted by mod_rewrite as .../handler.php?page=1 with the following .htaccess file: Options +FollowSymLinks RewriteEngine on RewriteRule page/([0-9]+)$ /handler.php?$page=$1 I try using the PHP GET function to call the page number. I tried using the following code but it just returned blank: <?php $page = $_GET['page']; echo $page; ?> What am i doing wrong? Link to comment https://forums.phpfreaks.com/topic/126697-mod_rewrite-help/ Share on other sites More sharing options...
JasonLewis Posted October 2, 2008 Share Posted October 2, 2008 Why do you have a $ in front of "page". Take that away and see if that fixes anything. /handler.php?$page=$1 Link to comment https://forums.phpfreaks.com/topic/126697-mod_rewrite-help/#findComment-655280 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.