0

I am working with Zend 2 framework and i want to integrate wordpress blog with that.

I added wordpress folder into the public folder and now blog is working but when I am click on inner pages 404 error showing. I changed the permalink postname to default then site is working but when on postname showing 404 error.

I already added htaccess in blog folder but still its showing 404 error. Can anybody let me know how to integrate step by step

5
  • its htaccess problem, try replacing with default htaccess code Commented Aug 21, 2018 at 5:29
  • I already do my htaccess file is # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /blog/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog/index.php [L] </IfModule> # END WordPress Commented Aug 21, 2018 at 5:52
  • which server you are using apache? and try moving from post to default permalinks, and switch back to post in permalinks Commented Aug 21, 2018 at 6:09
  • Would are your arguments against having a 2nd project with WP running on a subdomain (blog.*) instead? Mixing 2 applications for 2 separate purposes, especially WP with its update hell, is going to give you massive headaches. Commented Aug 21, 2018 at 6:12
  • yes i have apache server Commented Aug 21, 2018 at 6:15

1 Answer 1

1

Follow the simple steps given below to integrate Zend framework with other applications like WordPress, Joomla and other such open source or custom web applications.

i) Setup your Zend framework application as usual.

ii) Set the document root of the Zend application to the public folder within Zend install

iii) Now setup a folder for your wordpress or joomla or custom application. Let us assume that we want to create a custom blog application. Create a folder “blog” within “public” folder. Inside blog folder, create two files – .htaccess and index.php. Code for the two files are given below

index.php

<?php
echo “In custom application folder – testing”;
?>

.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule îndex\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L] 
</IfModule>

You needn’t have to setup custom route within Zend application for its integration with other applications when you follow these simple steps.

Sign up to request clarification or add additional context in comments.

4 Comments

where i add this code in public htaccessor in blog htaccess
Which htaccess i have 2 htaccess files 1 in public folder of and 2 in blog folder and can you please explain step by step
you put on blog folder
can you send me complete htaccess file for blog folger

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.