I'm trying to build a site using PHP and apache.
I have menu as my main navigation and tree on the left pane as secondary navigation for moving to different pages.
i'm also using .htaccess file for redirection.
on click of the tree items i pass URL of the form {menucategory}/{pageid.html} and the rewriterule in my .htaccess file is:
RewriteRule ^([a-zA-Z]+)/([a-zA-Z]+)\.html$ index.php?categ ory=$1&pageid=$ 2 [L,QSA]
now what's happennng is when i click any tree item first time it appends the URl with the base url like
hhtp://localhost/mysite/home/homepage.html -- i'm sending url home/homepage.html.
now when i click on some other tree item like home/login it is appending this url after the ../home/ instead of ../mysite/ like
http://localhost/mysite/home/home/login
can anyone tell me why it's happening like that...
I have menu as my main navigation and tree on the left pane as secondary navigation for moving to different pages.
i'm also using .htaccess file for redirection.
on click of the tree items i pass URL of the form {menucategory}/{pageid.html} and the rewriterule in my .htaccess file is:
RewriteRule ^([a-zA-Z]+)/([a-zA-Z]+)\.html$ index.php?categ ory=$1&pageid=$ 2 [L,QSA]
now what's happennng is when i click any tree item first time it appends the URl with the base url like
hhtp://localhost/mysite/home/homepage.html -- i'm sending url home/homepage.html.
now when i click on some other tree item like home/login it is appending this url after the ../home/ instead of ../mysite/ like
http://localhost/mysite/home/home/login
can anyone tell me why it's happening like that...
Comment