0

I have got this rule.. which I put as my first rule

RewriteRule ^categories_compare/$ index.php?app_table_comparison=3 [L]

This is the url that I type:

http://apps.com/categories_compare

The problem is that it doesnt do the redirect.. why is that?

This is part of my htaccess:

RewriteRule ^news2/([^/\.]+).(html)$ index.php?news_url_two=$1 [L]
RewriteRule ^news/([^/\.]+).(html)$ index.php?news_url=$1 [L]
RewriteRule ^categories_compare/?$ index.php?app_table_comparison=3 [L]

I want the last rule to work.

4

2 回答 2

0
RewriteRule categories_compare http://fuckedapps.com/index.php?app_table_comparison=3 [L]

好的,这就是没有任何 ^ 或 / 或 ^ 或 $ 的解决方案。

奇怪的是,当我放 ^categories_ 时它不起作用

于 2012-09-10T08:32:33.063 回答
0

你的正则表达式是: ^news3/$,所以它最后需要一个尾随/,但你只需要news3. 尝试将您的规则更改为:

RewriteRule ^news3/?$ index.php?app_table_comparison=3 [L]

/?意味着斜线是可选的。

于 2012-09-10T07:30:55.533 回答