Changes needed to make WordPress run along side Zend framework

If you need to run your WordPress blog along with your Zend framework website then upload the blog folder to the root directory and make the changes as outlined below

A normal Zend framework website will most probably have the following htaccess file at the root directory.

RewriteEngine On
RewriteRule ^\.htaccess$ - [F]  
RewriteCond %{REQUEST_URI} !^public/.*$
RewriteRule ^(.*)$ public/$1  
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ public/index.php [NC,L]

Now add the following lines in your htaccess and your blog will work correctly alongside your Zend framework website.

RewriteEngine On
RewriteRule ^\.htaccess$ - [F]

# BEGIN - Blog related changes
RewriteCond %{REQUEST_URI} !^blog/.*$
RewriteRule ^blog/(.*)$ blog/index.php [L] 
# END - Blog related changes

RewriteCond %{REQUEST_URI} !^public/.*$
RewriteRule ^(.*)$ public/$1  
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ public/index.php [NC,L]

Hope the above helped.

Please follow and like us:
error

Be the first to comment

Leave a Reply

Your email address will not be published.