drcj64241 2013-08-04 13:22
浏览 17

在为url重写设置url rewrite cond时需要很少的帮助

I have the following rewrite rule.

RewriteRule    ^products/([A-Za-z0-9-]+)?$    products/prd_templates/index.php?url=$1    [NC,L]

..that rewrites the page url correctly. Pointing it from

mydomain.com/products/product-alias -> mydomain.com/products/index.php?url=product-alias

Now my problem is this.

When i go to

http://www.mydomain.com/products 

My page seem to redirect to another page instead of loading my index.php in my products directory.

I think i need to set up some rewrite cond rule to prevent redirect of my products directory .

Wonder if there is anyone who could point me in the right direction. Thanks.

  • 写回答

1条回答 默认 最新

  • duanjiu3486 2013-08-04 14:13
    关注

    Found the solution.

    RewriteCond %{REQUEST_FILENAME} !-d

    评论

报告相同问题?

悬赏问题

  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题