immanuelvictor:
#RewriteCond %{HTTP_HOST} !^www.us-immigration.com [NC]
#RewriteCond %{HTTP_HOST} !^$
#RewriteRule ^(.*) http://www.us-immigration.com/$1 [L,R]
RewriteCond %{HTTP_HOST} ^us-immigration.com$ [NC]
RewriteRule ^(.*)$ http://www.us-immigration.com/$1 [R=301]
The first ruleset produces a 302 redirect and does not redirect www requests with an appended port number.
The second ruleset never gets to run. Even so, the L flag is missing from that rule.
Try one rule:
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
From Ultimate SEO URLs
RewriteRule ^(.)-p-(.).html$ index.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-c-(.).html$ index.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-n-(.).html$ index.php?main_page=news_article&article_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-m-([0-9]+).html$ index.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-pi-([0-9]+).html$ index.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-pr-([0-9]+).html$ index.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-pri-([0-9]+).html$ index.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
#RewriteRule ^catalog/(.)$ index.php?main_page=product_info&products_id=118&%{QUERY_STRING} [L]
RewriteRule ^(.)-pji-(.*).html$ index.php?main_page=document_product_info&products_id=$2&%{QUERY_STRING} [L]
For Open Operations Info Manager
RewriteRule ^(.*)-i-([0-9]+).html$ index.php?main_page=info_manager&pages_id=$2&%{QUERY_STRING} [L]
The multiple (.*) patterns cause this code to run hundreds of times slower than it should. Every URL request hitting your server results in mod_rewrite performing thousands or tens of thousands of "back off and retry" "trial match" attempts.
The code will run much more efficiently if the patterns can be parsed left-to-right in one attempt. Additionally, the [QSA] flag does the same job as &%{QUERY_STRING} but in less CPU cycles.
Try:
RewriteRule ^(([^-]+-)+)p-([^.]+)\.html$ index\.php?main_page=product_info&products_id=$3 [QSA,L]
RewriteRule ^(([^-]+-)+)c-([^.]+)\.html$ index\.php?main_page=index&cPath=$3 [QSA,L]
RewriteRule ^(([^-]+-)+)n-([^.]+)\.html$ index\.php?main_page=news_article&article_id=$3 [QSA,L]
RewriteRule ^(([^-]+-)+)m-([0-9]+)\.html$ index\.php?main_page=index&manufacturers_id=$3 [QSA,L]
RewriteRule ^(([^-]+-)+)pi-([0-9]+)\.html$ index\.php?main_page=popup_image&pID=$3 [QSA,L]
RewriteRule ^(([^-]+-)+)pr-([0-9]+)\.html$ index\.php?main_page=product_reviews&products_id=$3 [QSA,L]
RewriteRule ^(([^-]+-)+)pri-([0-9]+)\.html$ index\.php?main_page=product_reviews_info&products_id=$3 [QSA,L]
#RewriteRule ^catalog/(.*)$ index\.php?main_page=product_info&products_id=118 [QSA,L]
RewriteRule ^(([^-]+-)+)pji-([^.]+)\.html$ index\.php?main_page=document_product_info&products_id=$3 [QSA,L]
# For Open Operations Info Manager
RewriteRule ^(([^-]+-)+)i-([0-9]+).html$ index\.php?main_page=info_manager&pages_id=$3 [QSA,L]
There is still a huge danger in this code. The $1 backreference should be passed to the index.php script as another paramter and the value checked. If the $1 value is not valid for the current value of $3, the script should be returning either a 301 redirect to the correct URL or a 404 error. Failure to do this opens the site to infinite Duplicate Content issues because any and all values of $1 will result in your site returning a page of content and the "200 OK" status code.