• Resolved Craig

    (@craigrkirkby)


    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use the pastebin ]

    Hi,

    After updating to version 3.4.1, I edited my .htaccess code and the lights went out!

    My site now looks like this: https://www.lornakirkbyphotography.com.au/blog/

    YIKES!

    What did I do? My .htaccess code was this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    
    # END WordPress

    I then changed it to this (after a suggestion on the forum)

    # Use PHP5 Single php.ini as default
    AddHandler application/x-httpd-php5s .php
    
    # BEGIN WordPress
    RewriteEngine on
    #
    # Unless you have set a different RewriteBase preceding this
    # point, you may delete or comment-out the following
    # RewriteBase directive:
    RewriteBase /
    #
    # if this request is for "/" or has already been rewritten to WP
    RewriteCond $1 ^(index\.php)?$ [OR]
    # or if request is for image, css, or js file
    RewriteCond $1 \.(gif|jpg|css|js|ico)$ [NC,OR]
    # or if URL resolves to existing file
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    # or if URL resolves to existing directory
    RewriteCond %{REQUEST_FILENAME} -d
    # then skip the rewrite to WP
    RewriteRule ^(.*)$ - [S=1]
    # else rewrite the request to WP
    RewriteRule . /index.php [L]
    #
    # END wordpress

    And that’s when the lights went out! I can’t even get into my dashboard … it looks like this: https://www.lornakirkbyphotography.com.au/blog/wp-admin/

    DOUBLE YIKES!

    Please help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • popper

    (@julialasarte)

    If you go back to the previous .htacess everything should go back to normal. The handler you added is not working, and the php file is not being parsed.

    Thread Starter Craig

    (@craigrkirkby)

    Hi Popper

    Thanks for responding. I wish I could go back to the previous .htaccess. But my dashboard looks like this:

    https://www.lornakirkbyphotography.com.au/blog/wp-admin/

    It’s just code … how do I get back into my dashboard to re-edit the .htaccess code?

    Thanks again,

    popper

    (@julialasarte)

    You can download the file and edit it. You can do this via FTP or any file management software your host provides. Your host should have given you the FTP credentials when you created your account.

    Thread Starter Craig

    (@craigrkirkby)

    Thank you!

    I’ll get hold of my host and go from there.

    Thread Starter Craig

    (@craigrkirkby)

    My host has helped me turn the lights back on … thank goodness.

    Please tell me, should I delete the first two lines from my .htaccess code, i.e. this:

    # Use PHP5 Single php.ini as default
    AddHandler application/x-httpd-php5s .php

    or restore the original code; i.e. this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    
    # END WordPress

    Thank you!

    popper

    (@julialasarte)

    I think removing/commenting out that line should do it, but, I highly suggest you download a copy of the .htaccess first, edit it, and then re-upload it. That way, if something doesn’t work, you’ll just need to re-upload the original again. ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘.htaccess edit malfunction’ is closed to new replies.