Forum Moderators: phranque
i tried to get the value of the page, but it does not work.
If i do use the mod_rewrite to rewrite the url, i could get the value
from url, but after i add the mod_rewrite rule, i could not get it.
the following is my work, could you help me to find out why? thanks.
in the .htaccess file, i create a rewrite rule.
RewriteEngine On
RewriteCond %{QUERY_STRING} ^page=([^&]+)
RewriteRule ^([a-z]+)/Category.php$ /Category.php?[L]
then in the index.php file
<a href="country/Category.php?page=1">the country </a> <br>
<a href="city/Category.php?page=1"> the city </a> <br>
and in the category.php
echo $_GET['page'];
or $_REQUEST['page'];
or $_POST['page'];
but it does not work.
i am sorry, the above is;
If i do not use the mod_rewrite to rewrite the url, i could get the value
from url, but after i add the mod_rewrite rule, i could not get it.
It is likely that you are approaching this problem backwards -- See this thread [webmasterworld.com] for more information.
Jim