Answer the question
In order to leave comments, you need to log in
Wordpress + yii2 on the same domain. How to organize apache routing (.htaccess)?
Good afternoon dear community.
Tell me how to organize routing through apache for 2 entry points.
There is a site on wordpress and a personal account for users on yii2.
I added the prodlk folder to the root of the WordPress site, in which I added the yii2 script for my personal account.
In the root .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
# BEGIN YII2
RewriteCond %{REQUEST_URI} !^/lk/
RewriteRule ^(.*)$ prodlk/web/$1 [NC,L,QSA]
# END YII2
# BEGIN WordPress
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
</IfModule>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
Answer the question
In order to leave comments, you need to log in
I will not answer everything on the topic of the question, is it worth it, is it not possible to implement a personal account in wordpress?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question