mercredi 5 octobre 2016

laravel subfolders .htaccess

I have a question (and really tried already a lot of things).

this is the folder structure on my root:

/2014 
/2015 
/2016 
/2017
    .htaccess
    public
        index.php
        css

where 2017 has a Laravel website.

I know I need an .htaccess file inside the 2017 folder to rewrite to the public folder where the index.php file is /public This is the .htaccess file in the 2017 folder to achieve this:

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

First problem I have here is that now inside my Laravel code, when I access the website via www.dotfmp.com/2017 the $REQUEST_URI contains now "2017/{page}" instead of only "{page}".

My second question is what should be my .htaccess file in the root, so that any request coming on the www.dotfmp.com website will go to /2017 folder, however http://ift.tt/2dROMOf} should go to the intended folder.

An answer would be nice, an explanation even better, and a good resource the best :)

Thanks in advance

Andries



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire