5

My question is the opposite of this question: Installing Craft in sub directory

I have a Craft website and I need to put a Laravel application in a sub directory, it almost works. I have made the directory and created a symbolic link to the public folder for the Laravel application.

This works with the default route in Laravel but as soon as I try any nested routes I just get a Craft 404.

Is is possible to get Craft to completely ignore a folder or something, or do I need to figure out an alternative solution.

Thank you!

Alec Ritson
  • 4,529
  • 1
  • 19
  • 34

1 Answers1

5

Yes, possible. You just need to override the URL routing within the subdirectory, so requests to /sub/* get routed to /sub/index.php rather than /index.php.

For example, if you’re using Apache, just place Laravel’s .htaccess file within your subdirectory.

Brandon Kelly
  • 34,307
  • 2
  • 71
  • 137