My .htaccess file is:
Redirect 301 http://domain.com/news/articles?dtMain_start=150 http://domain.com/news/articles
Redirect 301 http://domain.com/news/
First of all: There is not mod_redirect. Redirect is a directive of mod_alias.
And the Redirect
directive, like any other directive of mod_alias, does only work with the URL path. So your Redirect
directives won’t work as expected. Use mod_rewrite equivalents instead:
RewriteCond %{HTTP_HOST} =example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteCond %{QUERY_STRING} ^dtMain_start=(150|160|170)$
RewriteRule ^news/articles$ /news/articles? [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
In general it is not a good idea to mix mod_alias and mod_rewrite if the patterns coincide with each other.