php后缀名隐藏? 请各位大侠指点下怎么实现如下链接这样的后缀名隐藏。shouji.com/Brand/model/ID像这样。从而调出产品信息。http://www.akku.net/AKKUINFO/DELL/1.10.DEL.2.16 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 URL Rewrite啊用Apache的rewrite模块就可以实现 apache配置文件中的rewrite_model开启参阅有关资料配置.ht文件就行了 用Apache的rewrite模块就可以实现,我占楼等下写个步骤给你。 步骤:1.开启apache Rewrite_mod模块。 httpd.conf106H 去掉 LoadModule rewrite_module modules/mod_rewrite.so之前的#2.在配置文件末尾添加虚拟主机配置view plaincopy to clipboardprint?NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot e:\test ServerName www.test.test </VirtualHost> <Directory "e:\test"> Options Indexes FollowSymLinks AllowOverride All Order Deny,Allow Allow from all </Directory> 以上相关选项根据自己项目的存放目录进行相关修改重新启动apache3.在项目根目录下新建.htaccess文件view plaincopy to clipboardprint?<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^([a-zA-Z]+)\/([a-zA-Z0-9]+)\.shtml$ $1.php?id=$2 [L] </IfModule> 只需要添加相关RewriteRule就可以上面写到的RewriteRule ^([a-zA-Z]+)\/([a-zA-Z0-9]+)\.shtml$ $1.php?id=$2 [L]实现了http://www.test.test/test/3.shtml 实际URL http://www.test.test/test.php?id=3 php 是怎样判断用户所在网络是网吧,公司内网,校园网和学校机房等 php,怎么从服务器端向客户端主动发信息 新手改的简单的判断语句求助,报错啦! QQ牧场的数据建表问题 如何虚拟IP地址? php 样式风格变样 弱弱的问个赋值问题 [简单的问题]可以使用正则表达式返回关键字符在查询字符串中的位子吗? 这样一个问题 help 基于数据库的计数器不好使 为什么使用filesize出错 求高手帮忙改下批量删除
用Apache的rewrite模块就可以实现
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot e:\test
ServerName www.test.test
</VirtualHost>
<Directory "e:\test">
Options Indexes FollowSymLinks
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
以上相关选项根据自己项目的存放目录进行相关修改重新启动apache3.在项目根目录下新建.htaccess文件view plaincopy to clipboardprint?
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^([a-zA-Z]+)\/([a-zA-Z0-9]+)\.shtml$ $1.php?id=$2 [L]
</IfModule>
只需要添加相关RewriteRule就可以上面写到的RewriteRule ^([a-zA-Z]+)\/([a-zA-Z0-9]+)\.shtml$ $1.php?id=$2 [L]实现了http://www.test.test/test/3.shtml 实际URL http://www.test.test/test.php?id=3