vendredi 4 octobre 2019

Wordpress blog installation inside Laravel application

I have checked so many solutions available online but no one worked for me.

I have my website built on Laravel Framework and I need to setup my wordpress blog in sub-directory(Blog was working fine before moving my website to Laravel).

Here are my .htaccess files

Laravel's Public Directory

<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

RewriteCond %{REQUEST_URI} !^/blog/
RewriteRule ^ index.php [L]

</IfModule>

And here is of wordpress

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On

#RewriteRule ^(.*)$ /

RewriteBase /blog/
RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>

I am using XAMPP on port 81 When i access domain.com:81/blog it is redirecting to domain.com/blog with Unable to connect message

Hope i will get some working solution?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire