Rewrite website missing pages

Hello everyone,

I am using a cms and the structure that it uses is sections, categories, and content.
I am considering changing to another cms that uses the structure of only categories and content.

Before I make this change, is this the rewrite rule that I should use after the change like:

RewriteRule ^mysite/(.*)$ /$1 [R=301,NC,L]

I ask this because it is most likely that the links will change. Does anyone also know how much this will affect seo?
Thanks

pb,

Every cms I’ve seen has its own mod_rewrite code to redirect to index.php so this would only be useful to redirect to eliminate the mysite directory from the URI.

Regards,

DK

Hello dklynn, and thanks for responding.

Okay so what would someone add to htaccess if the organization of the links change that will affect many pages which will end up lost from a search engine?
e.g.

http://mysite/apples/oranges/pears.html   
changes to  http://mysite/apples-oranges/pears.html  or  http://mysite/oranges/pears.html

pb,

When thinking about website reorganization, you are far ahead of the game if you PLAN the update. If you want to use mod_rewrite to redirect all old format URIs to new format URIs, you’ve got to create a pattern which you can identify the new format from the old.

Clear as mud?

Using your suggested redirections above,

apples/oranges/pears.html => apples-oranges/pears.html is fine as you could use RewriteRule ([a-z]+)/([a-z]+)/([a-z]+)\.html$ $1-$2/$3.html

apples/oranges/pears.html => oranges/pears.html is also fine as you could use RewriteRule ([a-z]+)/([a-z]+)/([a-z]+)\.html$ $2/$3.html

However, from your examples, I don’t understand WHY you would make such trivial changes (your problem, not mine, I know!).

What the above is supposed to show is that you MUST be able to use a pattern to grab the useful information from the OLD URI to create the NEW URI. Many mod_rewrite newbies do not understand that using id values which are different make it impossible for mod_rewrite to GUESS at the new id value from the old - but your examples avoid this problem so kudos for this.

If you need more detailed suggestions, understand that you do NOT need to reveal your domain name, just the URIs within the domain which need to be redirected. From that, actual URIs may be of assistance.

Regards,

DK

dklynn,

Yes, I am planning the change to the organization of my content. The question that I pose are theoretical and I thank you for your opinion. I maybe over thinking the situation and in the end not use any additional rewrite except for those currently used by the cms. This is why I have not provided an actual link.
I suppose that it has to do with all the fuss that everyone reads regarding SEO and “don’t do this or don’t do that”.
In the end, the mighty search engines will probably have their way and display who ever pays more.

I will hold onto the code that you provided and let it all simmer for now.
Thanks

pb,

You’re very welcome! Good Luck!

Regards,

DK