IT & Programming

How to route non-laravel php sub-site project in laravel framework

Your Goal:

Suppose you have an actual laravel framework project and you have a sub-site or application located in public/my_project which is made with native php code or with another framework. You want to keep it apart and want that Laravel's routing should not look for this directory when you access it via www.yourwebsite.com/my_project. Laravel route should totally bypass this url.

It is simple and easy to achieve this target just by adding below given code to your .htaccess file

RewriteCond %{REQUEST_URI} !^/my_project

After adding this code to you .htaccess file, your .htaccess file should look like as shown below

Leave A comment

Email address is optional and will not be published. Only add email address if you want a reply from blog author.
Please fill required fields marked with *