How to install laravel 4 application in a subdirectory of add-on domain (wordpress)

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 –

Read More
  1. WordPress will completely take over any requests for laravel sub-directory.
  2. How to match laravel/public request to laravel , so that I can access my laravel application via mywebsite.com/laravel instead of mywebsite.com/laravel/public.

Thanks in advance for all your help and effort.

Related posts

Leave a Reply

1 comment

  1. Well for starters I would install laravel to a directory outside your public_html (call it laravel)

    root
      |
       ---public_html
      |
       ---laravel
    

    Then I would create a sym-link in your wpdir pointing to the public directory in your laravel directory.

    folowing the patter:

    ln -s /path/to/file /path/to/symlink
    

    You could do

    ln -s /laravel/public /public_html/wpdir/laravel
    

    Then the probably the best bet would be to create a rule in your .htaccess file to circumvent wordpress’ pretty urls

    something like this:

    RewriteRule ^laravel($|/) - [L]
    

    This link might help with the rewrite rule:

    http://geronimo89.dk/2011/03/19/making-exceptions-for-wordpress-url-rewriting/