I have not much idea about url rewrite by htaccess file. I can rewrite url for one page, but when i click in 2nd page any link it keeps 1st page folder name in url and show 404 error. Here is my code
RewriteRule ^page1/([a-zA-Z0-9_-]+)\.html$ page1.php?pagenum=$1
RewriteRule ^page2/([a-zA-Z0-9_-]+)\.html$ page2.php?pagenum=$1
when from any page i go to page 1, url looks likehttp://localhost/page1/asad.php
But when is go 2nd page from 1st page /page1/ is no changing the url showing likehttp://localhost/page1/page2/asad.php
here is my problem I need url likehttp://localhost/page2/asad.php
please help me with suggestion.