2020年12月23日星期三

File .htaccess in Sub Folder (Wordpress inside Laravel)

I have Wordpress apps inside Laravel. This is what it's looks like.

public  --article  

WordPress inside article folder. The reason I do this because I want it to access WordPress like this {host}/article

There is issue occured. I can access {host}/article/wp-login.php. But when I fill The Login Form out and then send it, I got Laravel 404 Not Found Error Page.

This is weird because several days ago I can do that, but now error occured.

I think I miss some configurations in the .htaccess but I don't know the error.

This is my Laravel .htaccess configuration

# public/.htaccess    <IfModule mod_rewrite.c>      <IfModule mod_negotiation.c>          Options -MultiViews -Indexes      </IfModule>        RewriteEngine On        # Handle Authorization Header      RewriteCond %{HTTP:Authorization} .      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]        # Redirect Trailing Slashes If Not A Folder...      RewriteCond %{REQUEST_FILENAME} !-d      RewriteCond %{REQUEST_URI} (.+)/$      RewriteRule ^ %1 [L,R=301]        # Handle Front Controller...      RewriteCond %{REQUEST_FILENAME} !-d      RewriteCond %{REQUEST_FILENAME} !-f      RewriteRule ^ index.php [L]  </IfModule>  

and this is my WordPress .htaccess

# public/article/.htaccess    <IfModule mod_rewrite.c>  RewriteEngine On  RewriteOptions inherit  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]  RewriteBase /article/  RewriteRule ^index\.php$ - [L]  RewriteCond %{REQUEST_FILENAME} !-f  RewriteCond %{REQUEST_FILENAME} !-d  RewriteRule . /article/index.php [L]  </IfModule>  
https://stackoverflow.com/questions/65433479/file-htaccess-in-sub-folder-wordpress-inside-laravel December 24, 2020 at 11:06AM

没有评论:

发表评论