chapeen Posted October 14, 2008 Share Posted October 14, 2008 Hi I'm new to this forum and to url rewriting. One question. I named my link page/inicio, when i click the link the first time the adress bar show: page/inicio which it's ok but when I click a second time, the adress bar shows : page/page/inicio and that is not good , it doesn't bring to any of my pages. Anyone can help me ? Thanks! Quote Link to comment Share on other sites More sharing options...
neogranas Posted October 14, 2008 Share Posted October 14, 2008 This link is on a page, I am assuming? What code are you using and can you post that code? Quote Link to comment Share on other sites More sharing options...
chapeen Posted October 14, 2008 Author Share Posted October 14, 2008 The code is: <html> <head> </head> <body> <ul> <li><a href="page/inicio">Inicio</li> </body> </html> and inside the .htaccess file : RewriteEngine on RewriteRule ^page/([^/\.]+)/?$ index.php?page=$1 [L] Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted October 14, 2008 Share Posted October 14, 2008 Start your links with a forward slash eg <li><a href="/page/inicio">Inicio</li> Otherwise your browser will append the new link onto the existing url address. Starting links with a forward slash prevents this. Quote Link to comment Share on other sites More sharing options...
chapeen Posted October 14, 2008 Author Share Posted October 14, 2008 can't try it out now, but thanks anyways !! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.