I have a laravel application in: domain.com/co/app that controls it routes/web.php with code Route::post('/co/app'...
I have installed wordpress in the public folder of laravel (laravel/public/co) resulting in the blog: domain.com/co.
But when I activate the permalinks in wordpress the lavarel application (domain.com/co/app) I get a wordpress 404 error.
I have ignored the path of the application from the wordpress .htaccess RewriteCond %{REQUEST_URI} !(app) [NC]
but now I get an apache 404 error (The requested URL was not found on this server) and it does not show the laravel application.
This is the code of the .htaccess wordpress (laravel/public/co):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /co/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /co/index.php [L]
</IfModule>
This is the code of the .htaccesss de public (laravel/public)
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
This is the Route code of the Laravel application (laravel/routes/web.php)
Route::post('/co/app', [
'uses' => 'App@aaa'
])->name('app');
Thanks for the help
question from:
https://stackoverflow.com/questions/65650173/wordpress-permalinks-problem-installed-in-laravel-with-apache 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…