Redirect dynamic URL with two parameters to a static URL, htaccess

时间:2016-02-12 20:50:50

标签: .htaccess url redirect mod-rewrite url-rewriting

I have dynamic URL with two parameters (Dynamic values) which I want to rewrite and redirect to Static URL:

http://www.example.com/pagename.php?id=[some_number]&title=[some-title-seperated-by-hyphens]

above URL should be rewriten and redirected to below URL so that when either of the two URLs is entered in the browser address bar it should show the below URL. And I also want that even on hover on 1st URL hyperlink it should show the static URL on the bottom left of the browser:

http://www.example.com/[some_number]/[some-title-seperated-by-hyphens]

I have tried the below code and it does not work.

for (i=0; i<5; i++) {
    dollars[i]=(int)amounts[i];
    double decimal = 100*(amounts[i]-dollars[i]);
    cents[i]= (int)decimal;
}

1 个答案:

答案 0 :(得分:1)

Try these rules:

select * from stuff 
where start>= '01'
and end <= '03'