jeudi 14 février 2019

Laravel 5: links with ../public/.. are working, but shouldn't

I have a large Laravel / VueJS application. Although it's not finished 100%, everything so far is working as expected. The only problem I have at this point is URLs are working with the addition of the public folder

mydoamin.com/public/the/rest/of/the/url

as well as without

mydoamin.com/the/rest/of/the/url

The quetion + answer Avoid public folder of laravel and open directly the root in web server did not help that much. I believe it's something very simple I forgot in my .htaccess file?

Here is the content of the ./rootfolder/.htaccess

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://myracediary.com/$1 [R,L]
    RewriteCond %{REQUEST_URI} !^public
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

My project

I really need to fix this ASAP as google and other searchengines already crawled these URLs, even though I don't even know where the links to them should have come from in the first place: Google Result



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire