【发布时间】:2011-07-03 20:11:20
【问题描述】:
我有两页:
categories.php
在 categories.php 页面中,我获取所有类别。
news.php
在新闻页面中,我通过 id 获取新闻。
我已经使用 mod_rewrite 进行分类:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9-/]+)$ categories.php?url=$1
RewriteRule ^([a-zA-Z0-9-/]+)/$ categories.php?url=$1
site/categori1 ----> this rule works for categorie page
是否可以打开 mod_rewrite 两个不同的页面?(categories.php 和 news.php)
重写规则 ^([a-zA-Z0-9-/]+)$ news.php?url=$2 重写规则 ^([a-zA-Z0-9-/]+)/$ new.php?url=$2
site/news-title1 上面的规则不适用于 news.php 页面。
如何将 mod_rewrite 用于两个不同的页面? 提前致谢
【问题讨论】:
标签: mod-rewrite