301 redirect with url parameters

Tags: .htaccess
By : Ralph
Source: Stackoverflow.com
Question!

To keep google ranking i need to relink for exemple

Redirect 301 /kataloger.asp?id=1 http://www.domain.se/kataloger/category/kopplingar
Redirect 301 /kataloger.asp?id=2 http://www.domain.se/kataloger/category/ventiler

and in others ignore all but the id

Redirect 301 /produkter.asp?id=15 http://www.domain.se/produkter/kopplingar/a-lok-kopplingar/
Redirect 301 /produkter.asp?id=15&l=3 http://www.domain.se/produkter/kopplingar/a-lok-kopplingar/
Redirect 301 /produkter.asp?id=15&l=4 http://www.domain.se/produkter/kopplingar/a-lok-kopplingar/

But they all relink to /kataloger/ and /produkter/ and additionally throw a 404 att google. What do i do wrong?

By : Ralph


Answers

Found the answer here: How to 301 redirect old urls with query strings

RewriteCond %{QUERY_STRING} id=1$
RewriteRule (kataloger.*) /kataloger/category/kopplingar? [R=301,L]

RewriteCond %{QUERY_STRING} id=15&(.+)$
RewriteRule (produkter.*) /produkter/kopplingar/a-lok-kopplingar/? [R=301,L]
By : Ralph


Disabled is not an attribute and hence not a property of anchor tag

try this way

$(document).on('click', 'a.employee[disabled])', function(e){
  var empID  = $(this).data('emp_id');
  alert('here');
});


There may be a chance of string value in the column RVU.MA. Try out with the below query to find out such descrepancies.

   SELECT *
   FROM RVU
   WHERE ISNUMERIC (RVU.MA)!=1


This video can help you solving your question :)
By: admin