初学者URL重写的htaccess重写、初学者、URL、htaccess

2023-09-02 09:38:40 作者:鬼迹

我只是想重写所有的请求的:

I would simply like to rewrite all requests from:

http://example.com/products/product.cfm?id=product-name

http://example.com/products/product-name

其次,

http://example.com/category.cfm?id=some-category&sub=sub-category

http://example.com/some-category/sub-category

下面是我已经试过:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^products/$1 ^products/product.cfm?id=$1 [NC] 

我敢肯定,没有任何意义,因为我真的不知道我在做什么。我希望有人能告诉我,我要去哪里错了,我就可以通过举例如下。

I'm sure that makes no sense, as I really have no idea what I am doing. I was hoping someone could show me where I'm going wrong so I could follow by example.

谢谢! 乔治

推荐答案

的 http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/

我不喜欢纯粹的链接的答案,但上面的链接是非常有用的对我说:]

I don't like pure "link" answers, but the link above is extremely helpful to me :]