I have a wordpress website as an add-on domain on my shared hosting (LAMP). Now I want to install a laravel 4 application inside a sub-directory of the wordpress mapped directory, which is already a sub-directry of public_html folder.
So consider mywebsite.com
is my add-on domain which is mapped to wpdir
inside public_html
. I want to install laravel 4 application in a directory inside wpdir
, say for example, laravel
. Now my problem is following, considering pretty url is enabled in wordpress â
- WordPress will completely take over any requests for
laravel
sub-directory. - How to match
laravel/public
request tolaravel
, so that I can access my laravel application viamywebsite.com/laravel
instead ofmywebsite.com/laravel/public
.
Thanks in advance for all your help and effort.
Well for starters I would install laravel to a directory outside your public_html (call it laravel)
Then I would create a sym-link in your wpdir pointing to the public directory in your laravel directory.
folowing the patter:
You could do
Then the probably the best bet would be to create a rule in your .htaccess file to circumvent wordpress’ pretty urls
something like this:
This link might help with the rewrite rule:
http://geronimo89.dk/2011/03/19/making-exceptions-for-wordpress-url-rewriting/