Home >Backend Development >PHP Tutorial >求大神指点伪静态正则.

求大神指点伪静态正则.

WBOY
WBOYOriginal
2016-06-23 13:32:53985browse

目的是想让 http:www.aa.com /member/myinfo.php  -> http:www.aa.com /member/myinfo/

我是这样写的:

RewriteRule ^member/(.+?)/ ^member/(.+?)\.php

可是没有效果...

求指点指点,谢谢


回复讨论(解决方案)

<IfModule mod_rewrite.c>RewriteEngine OnRewriteRule ^member/(.+?)/$ member/$1\.php [NC]</IfModule>

<IfModule mod_rewrite.c>RewriteEngine OnRewriteRule ^member/(.+?)/$ member/$1\.php [NC]</IfModule>



谢谢啊  可是貌似没有哦
那个httpd.conf 里面是这样的:

RegistrationName=Longshui Chen
RegistrationCode=7Z3NU-7MAP5-JZDPH-PR9GK
[ISAPI_Rewrite]
CacheClockRate 3600
RepeatLimit 32

RewriteRule /index.html /index.php
RewriteRule ^member/(.+?)/$ member/$1\.php [NC]

是不是全换成你那样的呢?

现在换成 RewriteRule ^/member/(.*)/$ /member/$1\.php [NC] 可以了 谢谢啊

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn