arunpatal Posted February 19, 2014 Share Posted February 19, 2014 (edited) hi, I made clean url and facing one problem.... Example: my url look like this http://localhost/Viks/Sim1/Sim2/Sim3/Sim4 Now when i click on same link which is on same page url look like this http://localhost/Viks/Sim1/Sim2/Sim3/Sim1/Sim2/Sim3/Sim4 Edited February 19, 2014 by arunpatal Quote Link to comment https://forums.phpfreaks.com/topic/286315-htaccecc-url/ Share on other sites More sharing options...
Ch0cu3r Posted February 19, 2014 Share Posted February 19, 2014 (edited) The problem you're dealing with is that the browser thinks it is dealing with a relative path. If you dont start your link with a domain or a / then it'll append the link to whatever is currently in the url. To prevent this you need to make the link absolute, by adding the / at the start. Example <a href="/Sim1/Sim2/Sim3">Link</a> Edited February 19, 2014 by Ch0cu3r Quote Link to comment https://forums.phpfreaks.com/topic/286315-htaccecc-url/#findComment-1469528 Share on other sites More sharing options...
arunpatal Posted February 24, 2014 Author Share Posted February 24, 2014 Hi, can i use clean url for diffrent pages RewriteRule .* category.php?key1=%1&key2=%2&key3=%3 [L] AND RewriteRule .* index.php?key1=%1&key2=%2&key3=%3 [L] Quote Link to comment https://forums.phpfreaks.com/topic/286315-htaccecc-url/#findComment-1470330 Share on other sites More sharing options...
Ch0cu3r Posted February 24, 2014 Share Posted February 24, 2014 Yes, you can match different urls to different files. But you need to add some sort of unique identifier in your url in order for mod_rewite to know which file to route the request to. What is the current contents of your .htaccess file? Quote Link to comment https://forums.phpfreaks.com/topic/286315-htaccecc-url/#findComment-1470393 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.