WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks, .htaccess, and error 500 (17 posts)

  1. ctullis
    Member
    Posted 4 years ago #

    Hopefully I can get some help with this.

    I just installed WordPress, and I'm trying to set up permalinks to just be /archives/postname. My first step was to just choose one of the "common settings" so I chose month and name (http://www.cheryltullis.com/2009/08/sample-post). It said that because WordPress couldn't write to my .htaccess file I would need to manually change it. I logged into the cpanel of my host, and there wasn't an .htaccess file already created. So I followed the instructions on http://codex.wordpress.org/Using_Permalinks, made a blank 1.htaccess file, uploaded it, then changed it to .htaccess from my cpanel.

    After doing so, my entire site went error 500 - including the WordPress admin area. According to the "using permalinks" page, if I get an error 500 I should delete the .htaccess file...so if I do that, the site works, but I can't change my permalinks. Any help would be greatly appreciated.

  2. Samuel B
    moderator
    Posted 4 years ago #

    create the .htaccess again and leave it blank (use notepad)
    chmod to 666
    go to dashboard
    settings - permalinks
    set to desired
    will work now

    acceptable permalinks structures
    http://codex.wordpress.org/Using_Permalinks#Choosing_your_permalink_structure

  3. ctullis
    Member
    Posted 4 years ago #

    Hey, thanks for the advice...still having a problem unfortunately. I created a blank .htaccess file, uploaded it, chmod it to 666...and I get an error 500 when I go to my WordPress admin panel.

  4. ctullis
    Member
    Posted 4 years ago #

    Update: I figured out (I think) that I had just been putting the .htaccess file in the wrong folder. So that's corrected now, and I no longer get error 500. But now, when I log in to the WordPress admin panel and change the permalinks structure, I get an error 404 when I try to go to any page other than the index. For example, I set up an about page, and on the edit page for that I set the permalink to /about. Under my permalinks settings I have it set to month and post name, and on the edit page for the pages I've created it lets me change the permalink for it...but it still resolves to a 404 when I try to visit any of the pages I've made. Ack!

  5. Michael Shedd
    Member
    Posted 4 years ago #

    hey ctullis i'm trying to do the same thing as you... what folder did u end up sticking it in? and did u ever resolve this?

  6. Doodlebee
    Member
    Posted 4 years ago #

    "666" would be the wrong persmissions setting to make the file writeable (as designated by your host). Some hosts *will* allow 666 to work, but many force you to use 777 or 766.

    Your safest bet would be to just copy the code that's spit out and paste it into your .htaccess file and upload it.

  7. Michael Shedd
    Member
    Posted 4 years ago #

    thanks for the response.

    i'm having trouble locating the .htaccess file. i've gone through all the files on the server and i havnt been able to locate it anywhere. should there be one?

    i'm on a mac. could this lead to a hidden file since it begins with a . ?

    otherwise, i was reading through some other wordpress user questions on the forum and it was suggested to create your own.
    where do i stick it in that case?

    thanks again

  8. Michael Shedd
    Member
    Posted 4 years ago #

    okay so i found the .htaccess file... it was hidden, but i changed up some settings and found it.

    this is what i'm trying to do: i'm trying to make pretty permalinks. this note came up under the permalinks settings.

    If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    i opened the .htaccess file up using TextWrangler and was planning on inserting the code in there, but it already had that.
    any ideas? do i need to change the file permissions?

  9. Ellen Finkelstein
    Member
    Posted 4 years ago #

    I'm having similar problems. I created a new .htaccess, since there wasn't one and put the text in it. I'm getting Error 404 Not found. I think the problem may be due to my permalink setting. When I enter http://ellenfinkelstein.com/year/month/day/category/post-name, in the Custom Structure text box, it changes to /http:/ellenfinkelstein.com/year/month/day/category/post-name. In other words, the second slash moves to the front. Weird. What's happening?

  10. Michael Shedd
    Member
    Posted 4 years ago #

    i dont think that's what u r suppose to enter in the custom field.

    u can read more here ...well that's what i was able to understand from it.

    i think my problem is the file permission... cause it keeps saying operation not permitted.

  11. Ellen Finkelstein
    Member
    Posted 4 years ago #

    OK, I got it, just /year, etc. That worked, but I'm still getting Page not found. I'm going to start a new thread.
    Thanks

  12. Michael Shedd
    Member
    Posted 4 years ago #

    it was the permission code. i had my host change .htaccess permission code

  13. Doodlebee
    Member
    Posted 4 years ago #

    Glad you got it sorted, Michael.

    Ellen, you don't use /year, you use %year%. There's code below each setting to tell you how to use the pretty permalinks settings.

  14. sushi4me
    Member
    Posted 4 years ago #

    when you mention htaccess permission code change -- is this permission meant for updating.htaccess file or is it required so that wordpress can work correctly ?

  15. Ellen Finkelstein
    Member
    Posted 4 years ago #

    You just need to change the permission to update .htaccess and can/should change it back afterwards.

  16. Change the permissions to 666 or higher to save changes to an .htaccess file, but then change them back to 444 to prevent making inadverdant changes to the file and to prevent others from making changes. But 444 allows "everyone" to read the file, including WP.

  17. raasdesign
    Member
    Posted 4 years ago #

    So I too changed the permalink to a custom structure and saved the settings. Frontend now returns a 500 IS error, and the backend as well. I've deleted the .htaccess file, made sure it was empty, added mod_rewrite code, changed permissions (to 666 and 777), and nothing works.

    "Error 500 - Internal server error

    An internal server error has occured!
    Please try again later.
    "

    The access file now only has
    #BEGIN WordPress

    #END WordPress

    and the permissions are set to 666.

Topic Closed

This topic has been closed to new replies.

About this Topic