Forum Moderators: phranque
i am trying to rewrite a url to "http://www.mysite.com/country/page/3/". but the browser give me
the url of "http://www.example.com/country/page/1/country/page/3/" when i click a link
from the page of the "http://www.example.com/country/page/1/", and it brings me 404 error massage.
The works i have done as following;
.htacess file
RewriteEngine On
RewriteRule ^([a-z]+)/page/([0-9]+)/$ /Category.php?catName=$1&page=$3 [L]
index.php
note: when i click any link from the following, it does the rewrite url well,
for example, give me the rewrite url with the "http://www.mysite.com/country/page/1/".
<a href="world/page/1/"> the world </a> <br>
<a href="country/page/1/">the country </a> <br>
Category.php
note: when i click any link from the following, it give me a funny rewrite url,
for example,a rewrite url with "http://www.example.com/country/page/1/country/page/3/"
<a href="world/page/8/"> the world </a> <br>
<a href="country/page/3/">the country </a> <br>
[edited by: jdMorgan at 2:14 pm (utc) on Nov. 25, 2007]
[edit reason] examplified per Terms of Service [/edit]
RewriteEngine On
RewriteRule ^([a-z]+)/page/([0-9]+)/$ /Category.php?catName=$1&page[b]=$2[/b] [L]
Also, be sure you are completely flushing your browser cache before testing any changes to your server-side code.
Jim