Jump to content
Sign in to follow this  
Tawnya Sutherland

Permalinks in Wordpress

Recommended Posts

I seen Karri post something about Permalinks in another post and I thought I'd put one out there specifically for permalinks. Can anyone educate us on this?

 

I am assuming that what it does when all set up is give you a unique URL for each post instead of dynamic urls? This would be much better for SEO so I'm curious too.

 

Feedback appreciated on this topic...

 


vainsiders.jpg
Get your first month for $7 using coupon code: TRYFOR7

Share this post


Link to post
Share on other sites

Guest

Hopefully this will give you a little more info, but basically yes you are correct Tawnya:

 

Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to refer to your article (or section), or how you might send a link to your story in an e-mail message. Especially when they are used to link to individual postings, once a story is posted, the URL to it should be permanent, and never change. Hence the "perma" in the name.

 

There are three basic types of WordPress permalinks:

 

Default ("Ugly") The default looks like http://example.com/?p=N Where N is a number.

mod_rewrite

 

("Pretty Permalinks") These are the holy grail of permalinks. There are many different formats, but the most common, and most versatile looks like http://example.com/yyyy/mm/dd/post-name/ . Some people also eliminate some or all of the date elements (day, month, year) to have a shorter permalink format. mod_rewrite permalinks require Apache's mod_rewrite module, which means that people running other servers cannot use them

 

PATHINFO ("Almost Pretty") PATHINFO permalinks look very much like mod_rewrite permalinks but for one exception: they have /index.php inserted before them. Like so: http://example.com/index.php/yyyy/mm/dd/post-name/ Otherwise, they are the same as the "pretty" mod_rewrite permalinks, and are similarly flexible. Anything that mod_rewrite permalinks can do, PATHINFO permalinks can do, with the help of that /index.php part.

 

WordPress gets more involved on how to modify your permalinks...visit http://codex.wordpress.org/Using_Permalinks if you want to read more!

 

Hope that helps!

Share this post


Link to post
Share on other sites
Guest

Connie,

 

You would also require to get PermaLinks working to set up "pages" (like for a CMS) as well, correct?

 

This is what I've been struggling with ... as evidenced by previous rant ;)

 

Karri

Share this post


Link to post
Share on other sites
Guest Lisa Boyd

You would also require to get PermaLinks working to set up "pages" (like for a CMS) as well, correct?

 

Permalinks will automatically work for your Pages as well as archives, categories and whatever else you setup.

 

Your .htaccess file needs to be chmod to 666 to allow WP to write to it automatically. It needs to be in the main directory of your blog (ie. if your WP installation is in mainsite.com/blog/ then the .htaccess file needs to be in mainsite.com/blog/.htaccess).

 

In your blog control panel, select Options -> Permalinks. This is where you can customize how you want your permalinks setup. You can even set it up so all your posts end in .html for SEO reasons.

 

So what specifically are you gals having problems with? Understanding how they work? Getting them setup? Formatting them the way you want them to look?

 

Lisa B.

Share this post


Link to post
Share on other sites

 

So what specifically are you gals having problems with? Understanding how they work? Getting them setup? Formatting them the way you want them to look?

 

Lisa B.

 

ALL OF THE ABOVE ;) hehehe

 

Ok, I will work away a bit and see if I can figure it out and then come back here with my questions.

 


vainsiders.jpg
Get your first month for $7 using coupon code: TRYFOR7

Share this post


Link to post
Share on other sites
Guest

Ah, but check this out from the Codex (which I'm already investigating further!!):

 

http://codex.wordpress.org/Using_Permalinks

 

Having your posts end in .html

 

There's an easy way to having your posts end in a .html extension, using the structure tags above. Following the example used on properly terminating permalinks, you could have a page like http://yoursite.com/2006/01/01/happy-newyear.html with this rule:

 

/%year%/%monthnum%/%day%/%postname%.html

 

Note that this does not generate actual .html files. It is only an illusion. There is no benefit to this... some people mistakenly think it offers search engine benefits, and some want their permalinks to emulate those of another publishing system.

 

I'm not sure I'm on board with this but I'll let you know what else I find out!

 

Karri

Share this post


Link to post
Share on other sites
Guest

OK, here's where I'm at:

 

WP is letting me edit the structure of my PermaLinks. On my particular template there is an unordered list running horizontal underneath my header. This is where (presumably) I want to put my primary navigation/top level static-type pages (home, services, about, etc.).

 

I set my PermaLink structure to /%postname%.htm

 

The unordered list is located in the header.php file.

 

I've created a dummy/test page to try and get this working. The title is "services" and the slug is "services." How do I reference this new page in my unordered list? What comes after "href=" ?? I've tried everything including just "href="services.htm" (duh) but the server responding by saying that it can't find the URL /index.php and is also encountering a 404 error (file not found).

 

What the @!#&$()&%@#$)^&?

 

Is this s'posed to be this tough, or is there a simple, more direct path to what I'm trying to do?

 

Karri

Share this post


Link to post
Share on other sites
Guest Lisa Boyd

...

I set my PermaLink structure to /%postname%.htm

...

I've created a dummy/test page to try and get this working. The title is "services" and the slug is "services." How do I reference this new page in my unordered list? What comes after "href=" ?? I've tried everything including just "href="services.htm" (duh) but the server responding by saying that it can't find the URL /index.php and is also encountering a 404 error (file not found).

...

Karri

 

First off, pages are not posts. You've setup your permalink structure for /%postname%.htm -- that has absolutely nothing to do with pages.

 

If you do have PermaLinks working, your page slug "services" will be like a directory. So to make an active link directly to the page you created, you need to put href="/services/" for your anchor. This comes from your slug -- not your title by the way. So the title of your page could be "Karri's Services" and the slug could just be services. You will only put what the slug is as I showed above.

 

Does that help??

Lisa B.

Share this post


Link to post
Share on other sites
Guest

Hi Lisa,

 

OK, your comments re PermaLinks does clarify. I'll "let go" of the PermaLink thing for now ;)

 

I have tried href="/services/" in my anchor, still no luck. Keep getting this error:

 

Not Found

The requested URL /services/ was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.34 Server at www.snap-va.com Port 80

 

I am now wondering if the mod_rewrite module is not enabled on my server or something?? I'm looking into this to see if that's the case as I can't tell by looking in my cpanel.

 

Karri

 

PS: Have you heard of the wp_list_pages function now in WP? I tried this instead of manually referencing my Pages and it works but I still get the exact same problem with the links not working. You insert a piece of php between the ul tags.

Share this post


Link to post
Share on other sites

 

I am now wondering if the mod_rewrite module is not enabled on my server or something?? I'm looking into this to see if that's the case as I can't tell by looking in my cpanel.

 

Ok, mod_rewrite module is installed on my mediamage server which hosts all our domains Karri (see here according to my server people: It looks like mod_rewrite is enabled on that server, if you have a look here http://mediamage.com/phpinfo.php you will find it listed under the loaded modules subsection in the apache section.) Saying that, I am looking into finding out if this means it is on all our domains or not? I am assuming so if all domains are hosted on my mediamage.com but still waiting for confirmation from host.


vainsiders.jpg
Get your first month for $7 using coupon code: TRYFOR7

Share this post


Link to post
Share on other sites
Guest Lisa Boyd

 

I have tried href="/services/" in my anchor, still no luck. Keep getting this error:

 

 

Ok. I think you said before that your WP installation is in a separate directory. The "/services/" will go from your main domain name not the root of the WP installation. So "services/" should pull it from the WP installation directory.

 

Make sure that in your General Options that both the WP address and the Blog address are the same -- ie. www.karrisite.com/blog/ -- if that's where your blog lives AND where the core WP files are.

 

PS: Have you heard of the wp_list_pages function now in WP? I tried this instead of manually referencing my Pages and it works but I still get the exact same problem with the links not working. You insert a piece of php between the ul tags.

 

Yes I have. This is the standard way to have WP list all of your pages dynamically. If you, however, are setting up a custom menu somewhere and only want a link to one of your pages -- then you would reference the slug name of the page. I may have misunderstood what you were trying to do initially with trying to get a link up to a page.

 

I apologize for coming into this half-way through the conversation, but one of the best ways to learn about WP is to play around with different established themes. This may help you to see what code is there and what it is doing before you convert your own design into a theme.

 

I'd love to help answer any more questions that you may have with this though - I love WP and making custom themes from established designs :-)

 

Lisa B.

Share this post


Link to post
Share on other sites
Guest

Ok, tried those various on the anchor and still no go. I've got my Options set to http://www.mysite.com/blog/ in both fields so that is fine.

 

Still at a loss. If mod_rewrite is in fact enabled, then I would begin to wonder if there's a bug somewhere in this theme??

 

Karri

Share this post


Link to post
Share on other sites
Guest

Interesting: when I use 'a href="http://www.snap-va.com/blog/index.php/services"' as my anchor, it works! BUT then the "page title" at the top of the page content still references the target /blog/services (instead of the URL above).

 

Getting closer but still not there! I'm now more obsessed than ever to figure this out.

 

Karri

Share this post


Link to post
Share on other sites
Guest

[Editing this post]

 

Here's the deal:

 

Wordpress 1.5 used with Apache 1.3 causes PermaLinks not to work correctly. (WP versions 2.0 and up work around the Apache 1.3 iissues but I've not had any luck trying to upgrade my WP to 2.0.4!). ANYWAY, here is the workaround if anyone has this situation:

 

You must use index.php in front of your page slug when referencing the target page in your anchor text. For example, you would need to say a href="index.php/page-name"

 

Then in your PermaLink structures, you also need to use index.php. For example, a page structure might look like this:

 

index.php/%postname%/

 

There you go. Not a "pretty" PermaLink but you can just use 301 redirects if moving old static pages to this system. You will lose ranking for a while apparently but over time you'll be fine.

 

Here's some info that led me to all of this:

http://www.nosq.com/blog/2005/03/permalink...n-wordpress-15/

 

and here:

 

http://wordpress.org/support/topic/23487

 

Sheesh!

Karri

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Want to Become a VA?
    Invest in The VAC!
    How Do YOU Startup A

    Virtual Assistant Organization Association
    Upgrade Your FREE Account & Receive Today...
    * Access to Our Bus JOB Board *
    * Group Coaching & Training*
    *Training Tracks*
    * Private Mastermind Area *
    * Business Templates *
    * Contracts & Forms*
    * Plus VAinsider Perks! *
    UPGRADE HERE


    Virtual Assistant Organization Association

    Virtual Assistant Organization Association











×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.