zend framework deployment in server

后端 未结 2 1767
甜味超标
甜味超标 2020-11-27 08:10

I have a server, where I have uploaded my work in zend framework(in a subdomain). the folder name is \'visit\'.

So, When I go to: http://mysitename.com/visit, it sho

相关标签:
2条回答
  • 2020-11-27 08:42

    You can do this with the following rule set, which is in part a partially modified version of the one described in the documentation.

    .htaccess file in /visit:

    RewriteEngine on
    
    # Guard against people visiting /public/ directly
    RewriteCond %{THE_REQUEST} ^[A-Z]\s/visit/public/
    RewriteRule ^public/(.*)$ /visit/$1 [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    # Make sure we've rewritten to the ./public/ directory already
    RewriteCond $0 ^public/
    RewriteRule ^.*$ - [NC,L]
    # The index file is now at /visit/public/index.php
    RewriteRule ^.*$ /visit/public/index.php [NC,L]
    
    0 讨论(0)
  • 2020-11-27 09:07

    Also, these other approaches to deploying in shared hosting can help:

    • Zend Framework on shared hosting
    • http://www.alberton.info/zend_framework_mod_rewrite_shared_hosting.html
    • http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/
    • http://www.ttech.it/en/article/2010/03/zend-framework-all-projects-files-on-document-root/

    In particular, an answer by tharkun led me to write it up in more detail in a blog post.

    0 讨论(0)
提交回复
热议问题