homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Could htaccess help me with this?

 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]



 1:13 am on Mar 16, 2008 (gmt 0)

You can redirect the URLs with mod_rewrite or
RedirectMatch - 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. ;)


 2:16 am on Mar 16, 2008 (gmt 0)

Thanks much.


 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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved