php - How to place zend framework application in a wordpress website -
recently created application (sales portal) in php small company. company had website developed in word press. since hadn't worked word press way embedded application in website created sub directory on host , uploaded application there. e.g:
domainname.com - website
domainname.com/portal - application placed (the 'index.php' file).
since month learning zend framework 1.8 , want rewrite portal in zend framework since wrote portal scratch , core not secure if implements zend framework.
my question can include zend framework application wordpress website way did 'from-scratch' application, creating sub directory on host , upload application there? , if yes how should configure zend application recognizes 'domainname.com/portal' domain name (as home directory).
the problem face right when type http://www.domainname.com/portal/sales returns 404 because there not such directory on server. of course mean above mentioned link (domainname.com/portal/sales) is:
site: domainname.com/portal controller: sales action: index
i tried 'domainname.com/portal/index.php/sales' when opens portal link 'domainname.com/portal/' next linked clicked (e.g. domainname.com/portal/sales) shows 404.
(note: website http://www.domainname.com should accessible also)
thanks in advance.
i believe wordpress ues .htaccess redirect urls index.php.
this .htaccess pulled out of test installation:
<ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /wordpress/index.php [l] </ifmodule>
in case, need modify .htaccess
file not care what's in http://domainname.com/portal.
in case, .htaccess file @ this:
<ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewritecond %{request_uri} "/portal/" rewriterule (.*) $1 [l] rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /wordpress/index.php [l] </ifmodule>
basically, ignores subfolder 'portal' , doesn't process of normal rules.
however, there might down side: if future versions of wordpress updates .htaccess file, need make changes file again.
Comments
Post a Comment