Forum Moderators: phranque
I have heard that this can be performed incase of Apache using modrewrite
My problem is that i have already mentioned http://www.example.com/news.php?cat=1&ID=53 in many scripts and cannot change it... or i don't want to. just want that when user goes to http://www.example.com/article/news.php?cat=1&ID=53 the url he views on browser be http://www.example.com/article/news/1/53
Is that possible? How? give me some tips on modrewrite too if any. Or where can i get easy to use tutorial for modrewrite (.htaccess file i guess has to be changed. Correct?)
You could leave it at that, but there is a risk of confusing the bots a little, in that none of the links on your site directly link to the actual content. Every click the user makes goes through a redirect to get to the content (the rewrite is invisible to the user).
Because of that, it is far better that your page generation scripts be modified to mention the http://www.example.com/article/news/1/53 style of URL. In that way, that is what both the user and the bot actually sees, and that is what gets very easily indexed.
This question is asked every day on the forum. Check out this thread for an example... [webmasterworld.com...]
That example redirects a single internal URL to "/" and rewrites "/" to pull content from that same internal URL. It can be easily modified to work with dynamic and static URLs. There are hundreds of similar examples here.