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? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.