• <i id='msou2'><tr id='msou2'><dt id='msou2'><q id='msou2'><span id='msou2'><b id='msou2'><form id='msou2'><ins id='msou2'></ins><ul id='msou2'></ul><sub id='msou2'></sub></form><legend id='msou2'></legend><bdo id='msou2'><pre id='msou2'><center id='msou2'></center></pre></bdo></b><th id='msou2'></th></span></q></dt></tr></i><div id='msou2'><tfoot id='msou2'></tfoot><dl id='msou2'><fieldset id='msou2'></fieldset></dl></div>

    <small id='msou2'></small><noframes id='msou2'>

      <bdo id='msou2'></bdo><ul id='msou2'></ul>
  • <legend id='msou2'><style id='msou2'><dir id='msou2'><q id='msou2'></q></dir></style></legend>
    <tfoot id='msou2'></tfoot>

      1. 从 Zend 框架 url 中删除 index.php

        remove index.php from zend framework url(从 Zend 框架 url 中删除 index.php)
        <i id='njDl7'><tr id='njDl7'><dt id='njDl7'><q id='njDl7'><span id='njDl7'><b id='njDl7'><form id='njDl7'><ins id='njDl7'></ins><ul id='njDl7'></ul><sub id='njDl7'></sub></form><legend id='njDl7'></legend><bdo id='njDl7'><pre id='njDl7'><center id='njDl7'></center></pre></bdo></b><th id='njDl7'></th></span></q></dt></tr></i><div id='njDl7'><tfoot id='njDl7'></tfoot><dl id='njDl7'><fieldset id='njDl7'></fieldset></dl></div>
        <tfoot id='njDl7'></tfoot>
        • <bdo id='njDl7'></bdo><ul id='njDl7'></ul>
        • <legend id='njDl7'><style id='njDl7'><dir id='njDl7'><q id='njDl7'></q></dir></style></legend>

              <small id='njDl7'></small><noframes id='njDl7'>

                <tbody id='njDl7'></tbody>

                  本文介绍了从 Zend 框架 url 中删除 index.php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 zend 框架开发一个模块,并且我已经使用 zf create project 创建了一个项目命令

                  I am developing a module using zend framework and I have created a project using zf create project command

                  当我尝试使用 ip/folder/controller/action 访问 url 时,当我尝试使用 ip/folder/index.php/controller/访问时,它给出了错误未找到错误action 我可以访问,但在这两种情况下我都无法包含 js、css 文件,我的 htaccess 是

                  when i try to access the url using ip/folder/controller/action it is giving error not found error when i try access using ip/folder/index.php/controller/action i am able to access but i am unable to include js,css files in both cases and my htaccess is

                  RewriteEngine On
                  RewriteCond %{REQUEST_FILENAME} -s [OR]
                  RewriteCond %{REQUEST_FILENAME} -l [OR]
                  RewriteCond %{REQUEST_FILENAME} -d
                  RewriteRule ^.*$ - [NC,L]
                  RewriteRule ^.*$ index.php [NC,L]
                  

                  和 index.php 是

                  and the index.php is

                  <?php
                  
                     // Define path to application directory
                     defined('APPLICATION_PATH')
                     || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));
                  
                     // Define application environment
                      defined('APPLICATION_ENV')
                      || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') 
                         ? getenv('APPLICATION_ENV') : 'production'));
                  
                     // Ensure library/ is on include_path
                       set_include_path(implode(PATH_SEPARATOR, 
                       array(realpath(APPLICATION_PATH . '/library'), get_include_path(),
                  )));
                  
                  /** Zend_Application */
                  require_once 'Zend/Application.php';    
                  
                  // Create application, bootstrap, and run
                  $application = new Zend_Application(
                      APPLICATION_ENV,
                      APPLICATION_PATH . '/configs/application.ini'
                  );
                  $application->bootstrap()->run();
                  

                  推荐答案

                  尝试将其添加到您的 .htaccess 中:

                  Try adding this to your .htaccess:

                  RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /([^/]+/)*index.php 
                  RewriteRule ^index.php(.*)$ /path/to/your/installation$1 [R=301,L]
                  

                  用正确的路径替换/path/to/your/installation

                  Replace /path/to/your/installation with the correct path

                  这篇关于从 Zend 框架 url 中删除 index.php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                  <tfoot id='P1S7t'></tfoot>
                    <tbody id='P1S7t'></tbody>
                    <bdo id='P1S7t'></bdo><ul id='P1S7t'></ul>
                    <legend id='P1S7t'><style id='P1S7t'><dir id='P1S7t'><q id='P1S7t'></q></dir></style></legend>

                  • <i id='P1S7t'><tr id='P1S7t'><dt id='P1S7t'><q id='P1S7t'><span id='P1S7t'><b id='P1S7t'><form id='P1S7t'><ins id='P1S7t'></ins><ul id='P1S7t'></ul><sub id='P1S7t'></sub></form><legend id='P1S7t'></legend><bdo id='P1S7t'><pre id='P1S7t'><center id='P1S7t'></center></pre></bdo></b><th id='P1S7t'></th></span></q></dt></tr></i><div id='P1S7t'><tfoot id='P1S7t'></tfoot><dl id='P1S7t'><fieldset id='P1S7t'></fieldset></dl></div>
                        1. <small id='P1S7t'></small><noframes id='P1S7t'>