Page 1 of 1

htaccess help needed :: convert dynamic url

Posted: Tue Nov 16, 2010 9:04 pm
by yoursanjay
Hello,

I have a dynamic website where all the pages and sections are pulling out from Dynamic URLs like
http://www.mysite.com?pageId=5
or
http://www.mysite.com?pageId=9


There are hundreds of these type of links placed in my site and now I prefer to display static URL in the address bar. For example,
If any user click on the link 'http://www.mysite.com?pageId=5', in the address bar the URL it will be converted to 'http://www.mysite.com/service.html' and if clicked on 'http://www.mysite.com?pageId=9', it will be converted to 'http://mysite.com/about,html' and so on.

Will it can be done through htaccess file? If so, what should I write in the htaccess file?

I can not change the dynamic URLs of my site right now because there are hundreds of links are in my site.

Please suggest.

Re: htaccess help needed :: convert dynamic url

Posted: Tue Nov 16, 2010 9:46 pm
by requinix
Does your database (or whatever you use that stores those page IDs) relate the ID to a page name? In other words, given "/service.html" can you find "5"?