我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

删除.html扩展名,不包括一个目录[重复]

This question already has an answer here:

  • Reference: mod_rewrite, URL rewriting and “pretty links” explained 4 answers

I am using the following code to remove the .html suffix and would like to exclude it for my /billing directory. How can I do this?

All the files in my /billing directory have the .php extension

RewriteRule ^([^\.]+)$ $1.html [NC,L]
</div>

You can add a RewriteCond that excludes the rule in the billing directory:

RewriteCond %{REQUEST_URI} !^/billing/
RewriteRule ^([^\.]+)$ $1.html [NC,L]

近期文章

  • 使用html / php无法使用fancybox-function工作
  • 如何在不移动到PHP的下一页的情况下提交表单
  • Bootstrap中的Datepicker不会自动弹出
  • 使用php中的编辑和删除图像删除和更新行
  • 使用相同代码管理多个HTML的最佳方法?
  • symfony非常慢
  • php代码执行语法高亮显示
  • SQL查询 - 有条款
  • GAE中的clearstatcache()无法正常工作
  • 如何在php上对Json_encode进行排序?
  • 在Yii中获取验证码无效
  • 如果in_array在多维数组上
  • curl在YouTube中没有匹配 - 返回null
  • 使用PHP 4从数据库输出XML
  • 在Laravel组织儿童收集
  • 在Laravel Eloquent中获得独特的孩子
  • Php Web服务器通用Cookie注入
  • 将变量添加到使用jquery发布的数据
  • 数组codeigniter中的字符串转换错误
  • PHP菜单:用于父项的循环

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华