Error Accessing Site in Earth Hosting

Asked

Viewed 1,823 times

2

I transferred a website to network in an Earth hosting and when trying to access it displays the following error:

Not Found [CFN #0005]

I’m talking to the support - horrible, by the way (Neto) - and they say it’s my programming that is wrong.

They ask to check the files and the .htaccess. I’m wearing Laravel:

Man .htaccess is like this at the root:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

I do this to access the site without using the /public in the URL.

And inside the briefcase public there’s another .htaccess.

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

    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

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

That one .htaccess it is Laravel himself who makes.

And still the error persists. I have checked the permissions and they are all 755 or RX.

  • 1

    Did you have any admin on your system that configured permalink usage?

  • I do not know what is Permalink. It is Wordpress thing ?

  • You are using Wordpress??

  • I’m not. Laravel.

  • 1

    This does not seem to be an error of your Webserver (which to use .htaccess must be Apache) nor of permissions. It seems an error of your system. Apparently he expected to find the destination in the previously configured directory. As the index seems to have been processed, the rewrite rules seem to have worked normally. I suggest starting the investigation by processing the index. Change the index.php file to see if it is actually processing it. A simple die("AQUI"); that’s enough.

  • So the worst part is that I found out that Earth only has PHP 5.2. And Laravel 5.0 only works from 5.4. It’s horrible. Horrible. And they can’t change the version of my PHP otherwise it changes of all their clients.

  • 1

    That doesn’t work at all

Show 2 more comments

1 answer

4

I had trouble with hosting land with this same error and managed to solve with the following code:

RewriteEngine On

RewriteBase  /novo/

Rewritecond %{REQUEST_URI} !-f
Rewritecond %{REQUEST_URI} !-d
Rewritecond %{REQUEST_URI} !-l

RewriteRule ^([a-z0-9_\-]+)/?$ index.php?page=$1 [NC,L]

Rewritebase/new/ is the folder the site was in. If it’s at the root, just put: Rewritebase /

Source: https://duvidas.terra.com.br/duvidas/8887/como-habilito-urls-amigaveis-em-minha-hospedagem

Browser other questions tagged

You are not signed in. Login or sign up in order to post.