arunpatal Posted February 19, 2014 Share Posted February 19, 2014 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 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 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> 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] 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? Link to comment https://forums.phpfreaks.com/topic/286315-htaccecc-url/#findComment-1470393 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.