Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

WordPress does a 301 from http://example.com/?p=100 to http://example.com/post-title/, but I thought a URL rewrite was different from a redirect and therefore this wouldn't result in a 301.

Can anyone clarify?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

A rewrite enables http://example.com/post-title/ to translate internally to the proper query vars to load the requested post. The shortlink does a 301 redirect to the pretty URL because it should not be possible to access the same content from more than one URI. This is so a search engine won't index the same post under two URIs.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.