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 like
But when is go 2nd page from 1st page /page1/ is no changing the url showing like
here is my problem I need url like
please help me with suggestion.