How to use rewriteRule

i want to use rewriteRule redirect the url ,for example

http://127.0.0.1/hzn/hzn/story/list/page/2 redirect http://127.0.0.1/hzn/hzn/story_list2.html

http://127.0.0.1/hzn/hzn/story/Content?sid=15 redirect http://127.0.0.1/hzn/hzn/story_content15.html

how should i do?

any help be appreciated!


'/story_list<page:\d+>' => '/story/list',


'/story_content<sid:\d+>\.html' => '/story/Content',

thank you very much,

  but if 'story/content?sid=101' exists in the html page, it don't redirect the static html page,it still is story/content?sid=101 in the url address

how you generator this url? try


CHtml::link('content', array('/story/content', 'sid'=>101));

.

(SORRY FOR THE CODES ABOVE THAT I HAVE NEVER TESTED)

you are right

i generate it to the static html page,so it exists in the static html page ,just as

<a target="_blank" href="/hzn/hzn/story/content?sid=114">

                                                 &lt;img src=&quot;/hzn/hzn/images/story/pic2.jpg&quot; /&gt;


                                              &lt;/a&gt;