If you are a permalink pro, then you may wanna pass over this post.
I have been frustrated with almost all of my (non kubrick) installations of WP because the entries and archives come up with lame link addresses.
for a long time i’ve lurked here and read about “permalinks”
i’ve always thought “wouldn’t it just be killer if all the entries could come up simple and clean like “http://mydomain/the-tite-of-todays-entry” ?
so i stumbled about and timidly tried to change the permalinks and got a lot of “not found” errors, but never investigated. I set it on the back burner and said “maybe someday someone will explain how this works well enough for me to really try it.”
well that’s today, and i’m gonna explain it:
If you want to alter the way your links come up for simplicity, the love of a good URI (or URL) or you just forget all those numbers and junk so you tell people to use the archives page, or rifle through your categories… but they don’t, do they?
here’s how you make your links fabulous “permalinks”
in /wp-admin/options there is a link called “permalinks”
click it, and you are here: /wp-admin/options-general.php
All the junk you see on this page (that your eyes scan over without registering) are the thoughtful tags you can use to create “permalinks,” meaning you have choices about how you want your links to look.
here’s what i did:
i copied this from the options page:
and i pasted it into the first box and clicked the button called “update permalink structure”
then i went to my index, and i clicked on a title…
what do you know? no more “index.php?xyz…blah…33” it said:
i saw the light…
not wanting links that long, i removed everything that seemed silly to me, leaving:
i clicked the “update” button, and went back to the index to click on a title…
oh no! not found…
Then i noticed that there was this creepy little text generated in the last box, i felt sure it wasn’t there before. i read it, and it said:
RewriteRule ^category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?category_name=$1&feed=$2 [QSA]
RewriteRule ^category/?(.*) /index.php?category_name=$1 [QSA]
RewriteRule ^author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?author_name=$1&feed=$2 [QSA]
RewriteRule ^author/?(.*) /index.php?author_name=$1 [QSA]
RewriteRule ^([_0-9a-z-]+)/?([0-9]+)?/?$ /index.php?name=$1&page=$2 [QSA]
RewriteRule ^([_0-9a-z-]+)/?/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?name=$1&feed=$2 [QSA]
RewriteRule ^([_0-9a-z-]+)/?/trackback/?$ /wp-trackback.php?name=$1 [QSA]
RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /wp-feed.php?feed=$1 [QSA]
RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /wp-feed.php?feed=$1&withcomments=1 [QSA]
then i read what to do with it…
it is right there on the page (who knew?)
so i created a simple text file, and copied this text into it.
then i named it “htaccess” leaving the “.” off the start of it on purpose.
i uploaded it to my root folder (making sure there wasn’t already a file called “.htaccess” there (which there wasn’t)
then i renamed the file “.htaccess”
returning to my index, all my links, no matter where i went were simply:
impressed. thrilled. excited.
i ran right here to tell you all about it.
*one note worth mentioning:
if you do already have a file in your wp installation’s root folder, then you just have to download it, open it up, and add that arcane text to it, save it and reload it.
WP keeps blowing my mind.
i really hope this helped someone.
- The topic ‘permalinks: a moment of clarity’ is closed to new replies.