vendredi 1 mai 2020

is there any rewrite rule to map laravel's /public/ directory with its prevoius directory?

I am refering few website for references,

https://laracasts.com/discuss/channels/laravel/wordpress-and-laravel-on-subfolder?page=1

htaccess to allow laravel site inside of wordpress

Basically, I have placed a laravel directory inside a wordpress.

https://exmapledomain.com  -> Wordpress Directory
https://exampledomain.com/demo -> laravel directory

the folder structure is like this

/var/www/html/exampledomain/web    : Wordpres
/var/www/html/exampledomain/web/demo : laravel

from different refrences, i have placed a .httaccess file inside demo(laravel )

cat /var/www/html/exampledomain/web/demo/.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

now when i type : https://exampledomian.com/demo, it gives me 404 ( this 404 comes from laravel because its cant go to public, but if i type https://exampledomain.com/demo/public , it works fine



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire