Laravel and Wordpress On The Same Domain (Laravel in Subfolder)
Laravel and Wordpress On The Same Domain (Laravel in Subfolder)
and wordpress on the same domain(laravel in subfolder)
ExampleFiles
laravel and wordpress on the same domain(laravel in
subfolder)
I i have wordpress and laravel app, that should communicate by using AJAX‐
so they must be on the same domain.
wordpress site should be on the main domain ‐ MYdomain.com. and my laravel
app to be on MYdomain.com/panel .
wordpress .htaccess :
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond ! ^panel
RewriteCond %{REQUEST_FILENAME} !‐f
RewriteCond %{REQUEST_FILENAME} !‐d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
laravel htaccess(mydomain.com/panel)
<IfModule mod_rewrite.c>
RewriteCond ^panel
RewriteCond %{REQUEST_FILENAME} !‐f
RewriteCond %{REQUEST_FILENAME} !‐d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
i get Internal Server Error and the log from apache2 folder is:
[Thu Mar 12 15:31:07.596263 2015] [core:alert] [pid 1172] [client xxx.xxx.xxx.
how to solve it?
Thanks!!
Source
laravel and wordpress on the same domain(laravel in subfolder)
Asked By: Almog Asulin || Source
The 7 Most Valuable Foreign Coins:
From Europe To Afric…
Answer #1:
Your main .htaccess like this.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/panel [NC]
RewriteCond %{REQUEST_FILENAME} !‐f
RewriteCond %{REQUEST_FILENAME} !‐d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
In the panel folder change your rules to be like this.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /panel/
RewriteCond %{REQUEST_FILENAME} !‐f
RewriteCond %{REQUEST_FILENAME} !‐d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
Answered By: Almog Asulin
The answers/resolutions are collected from stackoverflow, are licensed
under cc by‐sa 2.5 , cc by‐sa 3.0 and cc by‐sa 4.0 .
laravel and wordpress on the same domain(laravel in subfolder)
# More Articles
django sort the query elements in a weekly monthly daily fashion
Merge two data frames considering a range match between key columns
Can I replace systemJS by webpack with angular2
How to make markdown text align justify
Finding HTML strings in document
What patterns cause the Swift compiler to panic / halt and catch fire? [closed]
Laravel ‐ Get client IP address ‐ Getting always 127.0.0.1 result
C++ classes without .cpp files?
Dynamically select all items in a Multi‐Select listbox using jquery
Why does ruby define variables even if it never executes the variable assignment code?
ASP.NET MVC, can the controller mutate the submitted values?
Print web page source code in python
How to 'order_by' on second table when using eloquent one‐to‐many
Why ScriptEngine has not Execute method anymore?
Is getDownloadUrl a paid operation?
Sorting the data in increasing order based on keys in Multimap Google Guava
ClickableSpan TextView stays selected after click
How do you add @html tags using javascript?
Android 5 screen glitch/static with Google Maps Fragment inside a Viewpager