1. <small id='NYCt0'></small><noframes id='NYCt0'>

    • <bdo id='NYCt0'></bdo><ul id='NYCt0'></ul>
  2. <tfoot id='NYCt0'></tfoot>

  3. <legend id='NYCt0'><style id='NYCt0'><dir id='NYCt0'><q id='NYCt0'></q></dir></style></legend>
    <i id='NYCt0'><tr id='NYCt0'><dt id='NYCt0'><q id='NYCt0'><span id='NYCt0'><b id='NYCt0'><form id='NYCt0'><ins id='NYCt0'></ins><ul id='NYCt0'></ul><sub id='NYCt0'></sub></form><legend id='NYCt0'></legend><bdo id='NYCt0'><pre id='NYCt0'><center id='NYCt0'></center></pre></bdo></b><th id='NYCt0'></th></span></q></dt></tr></i><div id='NYCt0'><tfoot id='NYCt0'></tfoot><dl id='NYCt0'><fieldset id='NYCt0'></fieldset></dl></div>

      htaccess 删除 .php 并保留查询字符串

      htaccess remove .php and keep query string(htaccess 删除 .php 并保留查询字符串)
        <tbody id='8w1Bl'></tbody>

          • <legend id='8w1Bl'><style id='8w1Bl'><dir id='8w1Bl'><q id='8w1Bl'></q></dir></style></legend>
                <bdo id='8w1Bl'></bdo><ul id='8w1Bl'></ul>

              • <small id='8w1Bl'></small><noframes id='8w1Bl'>

                <tfoot id='8w1Bl'></tfoot>
              • <i id='8w1Bl'><tr id='8w1Bl'><dt id='8w1Bl'><q id='8w1Bl'><span id='8w1Bl'><b id='8w1Bl'><form id='8w1Bl'><ins id='8w1Bl'></ins><ul id='8w1Bl'></ul><sub id='8w1Bl'></sub></form><legend id='8w1Bl'></legend><bdo id='8w1Bl'><pre id='8w1Bl'><center id='8w1Bl'></center></pre></bdo></b><th id='8w1Bl'></th></span></q></dt></tr></i><div id='8w1Bl'><tfoot id='8w1Bl'></tfoot><dl id='8w1Bl'><fieldset id='8w1Bl'></fieldset></dl></div>
                本文介绍了htaccess 删除 .php 并保留查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                这是我的 .htaccess 文件.

                Here is my .htaccess file right now.

                RewriteEngine On
                RewriteBase /
                RewriteCond %{REQUEST_FILENAME} !-f 
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.*)$ $1.php [NC,L,QSA]
                

                这样做的原因是它使我的页面在不使用 .php 扩展名时可以访问.

                This works in the fact that it makes my pages accessible when not using the .php extension.

                Old = domain.com/test.php
                New = domain.com/test
                

                不好的是,当我使用以下链接发送获取数据时,数据没有通过.我认为 QSA 选项可以做到这一点,这是怎么回事?

                The bad thing is that when I send get data with the following link the data is not passed. I thought the QSA option did that, whats the deal?

                domain.com/test?id=1
                

                推荐答案

                匹配整个查询字符串并使用反向引用将其附加到新 URL 应该可行.

                Matching the entire query string and appending it to your new URL using a back-reference should work.

                RewriteEngine On
                RewriteBase /
                RewriteCond %{REQUEST_FILENAME} !-f 
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteCond %{QUERY_STRING} ^(.*)$
                RewriteRule ^(.*)$ $1.php?%1 [NC,L,QSA]
                

                这篇关于htaccess 删除 .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 的问题)

                  <bdo id='MEBzM'></bdo><ul id='MEBzM'></ul>

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

                        1. <i id='MEBzM'><tr id='MEBzM'><dt id='MEBzM'><q id='MEBzM'><span id='MEBzM'><b id='MEBzM'><form id='MEBzM'><ins id='MEBzM'></ins><ul id='MEBzM'></ul><sub id='MEBzM'></sub></form><legend id='MEBzM'></legend><bdo id='MEBzM'><pre id='MEBzM'><center id='MEBzM'></center></pre></bdo></b><th id='MEBzM'></th></span></q></dt></tr></i><div id='MEBzM'><tfoot id='MEBzM'></tfoot><dl id='MEBzM'><fieldset id='MEBzM'></fieldset></dl></div>
                        2. <tfoot id='MEBzM'></tfoot>
                            <tbody id='MEBzM'></tbody>
                          <legend id='MEBzM'><style id='MEBzM'><dir id='MEBzM'><q id='MEBzM'></q></dir></style></legend>