• Hi, I recently updated my server OS, I changed from debian to ubuntu (16.04), anyway, I backed up everything, but I’m having troubles with this situation in specific.

    View post on imgur.com

    I have php 7.0 and I guess it is a problem on my htaccess but I don’t know how to fix it.

    But my sites present the same problem.

    Thank you for your help,

    Carlos.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello Carlos,

    I have found that when I download a site from many hosts, I need to comment out the AddHandler in .htaccess or I get the same behavior you are experiencing. Here is some information about the AddHandler command:

    https://my.bluehost.com/cgi/help/htaccess-php-handlers

    I hope this helps!
    Scott

    Thread Starter silveringking

    (@silveringking)

    Hi, I once backed up my wordpress with duplicator, it seems I lost the original .htaccess (or I cannot find it) and I have 4 files that say original, example:

    htaccess.170823161829.orig

    How do I recreated it?

    The htaccess.170823161829.orig might give you something to go on. You can check that and see if it works. Just rename that file to .htaccess or copy the contents into a new .htaccess file and give it a try. Is there an AddHandler line in the file?

    Scott

    Thread Starter silveringking

    (@silveringking)

    There is no add handler, I have 3 orig files all of those redirect to a new htaccess, but none has anything but a message saying to check htaccess X

    Thread Starter silveringking

    (@silveringking)

    I tried to restore the .htaccess by writing the following .htaccess:

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

    However it doesn’t work for me. What should I do?

    Hmmmmm… here is an example of what is in my .htaccess file for a site hosted using PHP 7.1:

    AddHandler application/x-httpd-php71 .php .php5 .php4 .php3

    Because I am running PHP 7.1. I just changed it to PHP 7.0 to test, and I get this:

    AddHandler application/x-httpd-php70 .php .php5 .php4 .php3

    I would try that in your .htaccess.

    Scott

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

The topic ‘Problem with php’ is closed to new replies.