Welcome to WebmasterWorld Guest from 188.8.131.52 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Pubcon Website
Could htaccess help me with this? weela msg:3601741 12:44 am on Mar 16, 2008 (gmt 0) I'm moving from one CMS to another and they generate different url patterns. Right now my urls look like this:
but the system I'm moving to has urls like this:
can htaccess rewrite those old urls to the new format, and if so what would the code look like? thanks in advance for any and all help with this.
[ edited by: encyclo at 1:14 am (utc) on Mar. 16, 2008] [edit reason] switched to example.com [/edit]
encyclo msg:3601752 1:13 am on Mar 16, 2008 (gmt 0)
You can redirect the URLs with mod_rewrite or
- but before you do so, see whether your new CMS can be set up to keep the old URL structure. Redirecting should be seen as a last resort.
There are some useful resources linked in the
Apache forum charter [ webmasterworld.com] - bear in mind that members are usually very willing to help debug code, but few are willing to write it from scratch. ;) weela msg:3601780 2:16 am on Mar 16, 2008 (gmt 0)
Thanks much. g1smd msg:3602205 6:00 pm on Mar 16, 2008 (gmt 0)
If you can keep the old-style URLs in your internal links, the search engines will have no idea that anything has changed on the site.
You can use a rewrite to connect those old-style URLs to the new-style internal filenames.
That is the best option.
Second best is to switch the URLs to the new format and redirect all the old URLs to the new URLs. That will lose some ranking for a while, and maybe some traffic too.