I have this 2 rules RewriteRule ^([^/.]+)/([^/.]+)$ /categories.php?secname=$1&catname=$2 RewriteRule ^([^/.]+)$ /categories.php?secname=$1 When i click on link first time it works fine and in url it show http://agile-web.com/Articles/dedicated_servers but now when i click on any other link the url becomes http://agile-web.com/Articles/Articles/Web_Hosting and I want http://agile-web.com/Articles/Web_Hosting each time I click on link, the url keep on increasing like above(means only last word after last '/' is replaced). Can anyone slove my problem? Thank you.
Maybe you want to have a leading / in those rewrite rules to make sure you get the whole URL. It's just a guess off the topof my head! Something like... RewriteRule ^/([^/.]+)/([^/.]+)$ /categories.php?secname=$1&catname=$2 RewriteRule ^/([^/.]+)$ /categories.php?secname=$1 If that doesn't work, let me know and I'll see if I can make some time to play with it!
mod_rewrite has nothing to do with that. Instead of <a href="Articles|Web_Design" class="verdana11blackbold">Web Design</a> have <a href="/Articles/Web_Design" class="verdana11blackbold">Web Design</a>
Thanks, but RewriteRule ^/([^/.]+)/([^/.]+)$ /categories.php?secname=$1&catname=$2 RewriteRule ^/([^/.]+)$ /categories.php?secname=$1 didn't worked. I could not open the page. And to Nintendo, I have made <a href="Articles|Web_Design" class="verdana11blackbold">Web Design</a> this to keep the site working. Otherwise I want to do this <a href="/Articles/Web_Design" class="verdana11blackbold">Web Design</a> But this is creating problem as I mentioned before. Thank You.