Permalink format adjustments Apr20 '07

Feedback

# (1 of 5): Matt Brundage » mattbrundage.com

6 hours, 48 minutes after the fact. (Fri 20 Apr 2007, 4:00 PM CST)

I used to have the superfluous "/blog/" as part of my permalink.

When you set up permanent redirects, Google's re-indexing will be seamless. Once you've made the necessary changes in your blog software, the .htaccess rule is deceptively simple: redirect 301 /archive/ http://matthom.com/

This is a blanket 301 for every URL under the /archive/ directory.

It get much more complicated if you're thinking about editing the post "slug", a.k.a. which words to leave out of the title.

# (2 of 5): Matthom

8 hours, 44 minutes after the fact. (Fri 20 Apr 2007, 5:56 PM CST)

Thanks Matt. That .htaccess rule should work great.

It get much more complicated if you're thinking about editing the post "slug", a.k.a. which words to leave out of the title.

You're right. I think I'll stay away from that then.

Previous comment Return to entry

# (3 of 5): Tim

22 hours, 47 minutes after the fact. (Sat 21 Apr 2007, 7:58 AM CST)

It looks to me like that rule above would redirect everything to the homepage. wouldn't that totally screw you on any existing incoming links. Nothing would end up where you wanted it to. A rule like this would maintain the rest of the URL.

RewriteRule ^archive/?(.*)?/?$ /$1 [R=301,L,QSA]

As for shortening your slugs. URLS of over 100 total characters are bad for some search engines. I would recommend retaining the existing slugs in a separate column in the entries table. Shorten the slugs you want to shorten. Then in your 404 page add a block that checks to see if the slug requested that triggered a 404 exists in the retained column if so, give them a redirect, if not give them the 404. I have used this trick on several sites we have redesigned at work to help maintain proper content access.

Previous comment Return to entry

# (4 of 5): Matthom

1 day after the fact. (Sat 21 Apr 2007, 10:01 AM CST)

Thanks Tim. I'll try that .htaccess rule as well.

Previous comment Return to entry

# (5 of 5): Matt Brundage » mattbrundage.com

2 days, 10 hours after the fact. (Sun 22 Apr 2007, 8:09 PM CST)

Tim~ It may seem like my rule above would redirect everything to the homepage, but it doesn't. In fact, I'm employing a similar rule on my site right now: redirect 301 /blog/ http://mattbrundage.com/ It works like a wildcard in that only part of the URL is redirected. Everything after "/blog/" remains. The rest of the URL is maintained without a specific RewriteRule.

FYI, I'm on Apache 1.3.34 on Unix.

Previous comment Return to entry

RSS feed for comments on this post

Leave feedback

Feedback

Input format: The editor controls below will assist with Markdown syntax.

Status

Sub-status

Your info

Return to entry.

I may start making adjustments to the format of "permalink" entries on my site.

You are at the feedback permalink page for: Permalink format adjustments

Read more...