Will my pretty URLS be automatically redirected?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

Will my pretty URLS be automatically redirected?

Post by Guido »

I've been looking for a while now for this but can't find a clear solution anywhere:

I've turned on pretty URLS according to the manual using mod_rewrite in config.php. My pages now change to

www.mysite.nl/sub/page.html

which is nice. But I read a lot about SEO suicide if you don't redirect your old page=blabla to you new pretty URLS. I found that you have to add:

RewriteCond %{query_string} page=page
RewriteRule (/)?$ http://www.mysite.nl/sub/page.html? [R=301,L]

to .htaccess for all your pages. So I did for all my pages but none of them (except the root) worked after that. I got the .htaccess file directly from the docs folder and uncommented the "/" and "\" redirects.

I added all the www.mysite.nl/subs/ to my robots.txt to be allowed but my question is this. Do I need to redirect and if so: how?

There is a lot about this on this forum and the documentation but nothing really conclusive. Is there like some kind of automated redirect? I don't care if I have to redirect all my pages manually either but as I said: I can't find how. And can someone explain the difference between internal pretty URLS and non-internal?

Thanks.
nhaack

Re: Will my pretty URLS be automatically redirected?

Post by nhaack »

Hi Guido,

Usually, your pages will still be available with their old path. So you actually have a different problem. You do not loose your content... search engines find the old pages (which still work) and find the new ones... your internal linking will point to the new ones, however, the engines still know the old urls and they provide content and a status 200 (ok), but the engines don't know for sure how they are connected to new ones. They just look pretty damn similar ;).

Now your CMS tells the engines: "look, I have a bunch of new pages, they are all somewhat important (by e.g. how they are interlinked)."

So the engines pick them up. They still have their positions for the keywords they think a single old ur of your site should rank for (based on e.g. content and the external links pointing to your single pages and such). So now both may compete against each others for positions.

However, engines will most likely only show one of the pages with their respective "power". I wouldn't call this suicide, but its definitely a gun shot into the foot. As your old ones would loose positions, The idea behind this redirecting and canonical thing is that you sort of merge the ability of both versions so you take advantage of what you have achieved already.

Use the canonical attribute for the link element (google for "rel canonical" or search the forum). Provide a sitemap with the preferred Urls and you should be fine. In most cases, you can use regular expressions to extract the info and have this mapped to the new url. However, you might need different patterns for different modules used.

Here is a wonderful tool to play with regular expressions and to more or less quickly create the patterns you need: http://gskinner.com/RegExr/ (via SimonSchaufi).

So at the end, if you want it simple, leave out the redirecting and use the canonical element. Think of the canonical element as a soft 301 redirect. If you want it absolutely neat and tidy, create redirect patterns.

Regarding your question regarding the difference between the "types of pretty urls", you might want to read this: http://wiki.cmsmadesimple.org/index.php ... l_Settings

Best
Nils
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

Re: Will my pretty URLS be automatically redirected?

Post by Guido »

Wow thanks for that. I have updated my sitemap to the pretty URLS and submitted it to google. I can follow how many pages it indexes from that sitemap and it's starting to pickup so that's nice.

I think what is best for me to do as you said is to use the canonical titles.

Again Thanks.
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

Re: Will my pretty URLS be automatically redirected?

Post by Guido »

OK I found on this forum a way to make a {canonical} tag. So I copied it and incorporated it in my templates. Works like a charm. Just not for the news articles yet, it just shows the detail landing page. I'll keep looking.
Post Reply

Return to “CMSMS Core”