【发布时间】:2014-01-28 23:26:03
【问题描述】:
我是 htaccess 文件的新手,有以下要求。
我有一个像这样处理的动态页面
com/index.php?postname=products
.com/index.php?cat=news&country=india
对于这些页面,我想要这样的 SEO 友好网址
.com/products/ to .com/index.php?postname=products
.com/news/country to .com/index.php?cat=news&country=india
我需要什么代码将其放入 htaccess 文件中?
我需要编写 RewriteCond 或 RewriteRule 还是两者兼而有之?
如果可能,请给我执行此操作的示例代码。
【问题讨论】:
标签: php apache .htaccess mod-rewrite