WordPress.org

Ready to get started?Download WordPress

Forums

Problem with Permalink "date and name based" - links default to my home page (10 posts)

  1. maceddy
    Member
    Posted 6 years ago #

    My blog is in a subdirectory of the main website.

    Main website: http://www.maceddy.com
    Blog: http://www.maceddy.com/blog

    I tried to change to "date and name based" permalinks. I created the .htaccess file in the same directory as the wordpress file, as directed. I then opened and edited the blank file and cut and pasted in the code, as directed.

    Each post name did show up in the URL line correctly (ie, the date, title with hyphens, etc) - however, instead of showing the actual post it just defaulted to showing my home page at http://www.maceddy.com.

    I have since changed it back as it was before until I can understand what I need to do to fix this. Is it a problem because the blog is in a subfolder of my homepage - which is a Zencart? And obviously there is a .htaccess file in the main home page...so maybe that conflicts?

    Or is there some other thing that I need to do that I am missing?

    Do I have to have the blog directory in front of the main website to fix this? ie, blog.maceddy.com instead of maceddy.com/blog? Or will it screw up the zencart?

    Thank you.

  2. Kalessin
    Member
    Posted 6 years ago #

    It should work fine in /blog. Can you try changing the permissions on your .htaccess file and letting WordPress write the changes itself? Sometimes there may be issues with line endings, particularly if your web host is running Linux and you edited the .htaccess file in Windows.

  3. maceddy
    Member
    Posted 6 years ago #

    I set the permissions to 666 and left the .htaccess file blank-nothing written in the text file, is that what you meant?

    And yes, my web host is running Linux and I edited it from within my Cpanel.

    However, it still defaults to the maceddy.com home page when you click on the blog links.

    I have left it this way so you can see that it is still doing this.

    The .htaccess is in the public_html/blog folder, the same folder that has the admin, content and includes folders, and the wp-config.php file.

    What am I doing wrong?

    Sharon

  4. Kalessin
    Member
    Posted 6 years ago #

    I meant permissions to be set to 777, but if you edited the .htaccess file in cPanel it should be fine, I would have thought.

    Can you post your .htaccess file contents?

  5. maceddy
    Member
    Posted 6 years ago #

    Sorry for the delay in getting back on this, I have a very ill husband and am tied up a lot with handling his medical issues...

    I changed the permissions to 777 (instead of 666) and looked at the file contents...and the .htaccess file is still blank - nothing in it.

    I checked again and the same problem is occurring with the links defaulting back to the home page.

    In Cpanel, the under the name of the file it says: File Type: very short file (no magic)

  6. Kalessin
    Member
    Posted 6 years ago #

    What happens when you change the permissions to 777 and then go to Settings -> Permalinks in WordPress and click the Save Changes button?

  7. maceddy
    Member
    Posted 6 years ago #

    I don't get where "save changes" is. I was working in Permalinks section in the Options section, and then click on "update permalink structure" (which seems to be the 'save' option). It then says "you should update your .htaccess now..." (which I am leaving alone.

  8. maceddy
    Member
    Posted 6 years ago #

    ...sorry, and it's still doing the same thing. Help, what do I do?

  9. maceddy
    Member
    Posted 6 years ago #

    I have temporarily changed it back to the old kind of links...but would change it back to the pretty permalinks if we can debug why it's still defaulting to my home page (a zencart) when one clicks on a pretty permalink.

    Most appreciative of any help on this.

    Thanks.

  10. Kalessin
    Member
    Posted 6 years ago #

    So, what you're saying is that even with .htaccess permissions set to 777, WordPress still cannot write to the file? In that case, please try it again with permissions set to 644.

    If that doesn't work, can you manually make the changes to the .htaccess file please, and post the contents of the new .htaccess file here? If you could also post the contents of the .htaccess file in the main folder too, that might help.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags