lundi 27 novembre 2017

Redirect to non-www gives 404

I have DNS @ and www A-records pointing to my server IP. In .htaccess I have:

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301]


    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

But when I visit www.site.com, I get site.com/app.php and "Sorry, the page you are looking for could not be found."

What can be the problem?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2k4BZvA
via IFTTT

Aucun commentaire:

Enregistrer un commentaire