(Ask) Redirect URL after rewrite

Discussion in 'Apache' started by ogah, Apr 1, 2013.

  1. #1
    i have rewrite URL with htaccess
    
    RewriteRule ^(.*?)_([0-9]{1,})\.html ./?q=$1&page=$2
    RewriteRule ^(.*?)\.html ./?q=$1
    
    Code (markup):
    that's rewrite work fine if i open URL mydomain/query.html and mydomain/query_2.html

    but if i open with URL mydomain/?q=query and mydomain/?q=query&page=2 the address still like that's (not automatically redirected to new URL).

    how to redirect with htaccess URL or request URI with q= and page= to my new URL?
     
    ogah, Apr 1, 2013 IP