Jump to content

Permalinks


Recommended Posts

I followed the directions for changing the permalink structure and successfully modified the htaccess file. My posts did indeed get a nice looking url. However, when I clicked on a category link or an archive month, I'd get a "page doesn't exist". If I clicked "next" to go my next post, same thing. I looked at the url for the archive month, and changed the permalink structure to mimic that (2005/12/postname/ -- I noticed that's how blogger does posts), but to no avail. All that did was give me "file not found" errors. So.... I deleted the permalink command and cleared out the htaccess file. Now, it works fine, but no post titles in my url :lol2:

 

I've poked around on the wordpress boards and I've noticed that many are having the same problem as I am. Someone said that if this happened, it meant that the server was incapable of doing permalinks correctly. I personally think it's a software glitch. What say ye? Should I give up and wait for a patch, believe them when they say it's a server issue, or keep trying to find a workaround?

Link to post
Share on other sites

Yes, I copied and pasted it into the file, and I just now tried it again...

 

I've made 2 entries and set it for one post per page. So...

 

you can see my post if you go to the direct link:

h*tp://www.****/blog/category/updates/hello-world/

and you see the comment form on the bottom...

 

However, if you are on my blog main page at

h*ttp://www.****/blog/

and you click on "next post"

it takes you to:

h*tp://www.****/blog/page/2/

and says, "sorry no posts met your criteria"

Same thing if you click on December 2005

in the archives section.

Link to post
Share on other sites

Yeah, they're actual posts in the blog. I'm too cyber-clueless to know how to fix it, but I've figured out a way to beat the system, haha!!! It requires a little more effort from me when posting, but I don't plan to blog every day, so I think it'll work okay for me.

 

I took out the "archives" and "categories" from the sidebar script in the theme file I'm using, and created my own archive and categories in the "add links" section. I gave them the correct url for grabbing the month and category, respectively.

 

Then, I went to the index.php file and took out the "Filed Under" script and the "navigation" script that puts "previous, next" on my posts. Now, all I have to do is title my post with the "category - post title" for clarity, and then manually add the link to the previous, next posts at the bottom of future posts. To avoid confusion, it looks like this:

 

Previous Posts -- Site Updates -- Next Post

Previous Post -- December 2005 -- Next Post

Edited by zilla
Link to post
Share on other sites

I think Bruce is right.

 

When you add new Pages (using the Write Page fuction in WP), WordPress has to modify the .htaccess file again so that the permalink files are working properly.

 

I think you have a couple of options.

 

(1) Before you create new pages you can chmod the .htaccess file to 666, create your page(s), and then chmod the .htaccess file back to what it was (you probably don't want to leave it at .666 or you are vulnerable to attacks).

 

(2) When you have created new pages, you can regenerate the .htaccess file output in WordPress, and copy and paste it into the .htaccess file, replacing all the previous content.

 

These aren't great solutions, but its what I've had to do to make it work for me too.

 

Good luck....

Link to post
Share on other sites

hmmmmm........

 

I'm using the classic theme because it was the most similar to how I wanted my blog to look. It was created for older versions of WP, so that is a definite possibility for the source of my problem....

Link to post
Share on other sites

Well, I saw where someone said to modify the one in the /blog folder. I tried that but it made no changes at all to my permalink structure. Here's some relevant info on that:

  • my blog folder didn't have an htaccess file. So I tried copying and pasting the one from public html into the blog folder and then adding the wp-generated code. It didn't change the permalinks at all when I tried that, so I re-deleted it.
     
  • here's a code snippet for the mod_rewrite rules that wordpress generated. So, when I put it in the /blog/ directory, I think it made it look for *****/blog/blog, which doesn't exist, but I could certainly be wrong about that:
    ><IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/


I appreciate your taking the time to chat with me about this. :tchrocks:

Edited by zilla
Link to post
Share on other sites

Do the following in cPanel

 

Open the file manager

Go to your "blog" folder

Create a new text file

Give it a name of .htaccess

Give it permissions of 644

Edit the file you just created

Copy/Paste your permalink strcuture into it

Save your changes

 

That should be all you need.

Link to post
Share on other sites

:blink: It worked!

Shame on me for not trying the simple solution first. I don't get why creating a new .htaccess file was successful when copying the old one didn't work, but oh well.... The important thing is that it worked. Thanks a bunch for your patience.

Link to post
Share on other sites

YAY! Congratulations on getting it to work.

 

I think that the problem may have been that you didn't want the same info in both .htaccess files. I mean, it sounded like you took the .htaccess file from your public_html directory and ADDED to it the info from your WordPress output.

 

What you did by creating a new one is you didn't keep the irrelevant stuff that applied only to the public_html directory. Now you're just getting the .htaccess info that applies to the WordPress directory.

 

Anyway, I'm glad for you that it is working.

Link to post
Share on other sites
:blink: It worked!

Shame on me for not trying the simple solution first. I don't get why creating a new .htaccess file was successful when copying the old one didn't work, but oh well.... The important thing is that it worked. Thanks a bunch for your patience.

As Paul said, there was probably something in the original .htaccess file conflicting with what Wordpress was creating.

 

Anyway, glad I could help you get it sorted out. :blink:

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.

×
×
  • Create New...