-1

I want to redirect domain.com/folder1/nisanth.php?id=1 to domain.com/folder2/nisanth.php?id=1. How can i write my htaccess line? I tried using

Redirect 301 /folder1/nisanth.php?id=$1 /folder2/nisanth.php?id=$1

but no use.

George
  • 36,413
  • 9
  • 66
  • 103
Nisanth Kumar
  • 5,667
  • 8
  • 33
  • 43

2 Answers2

0

Should be

Redirect 301 /folder1/nisanth.php?id=(.*) http://www.domain.com/folder2/nisanth.php?id=$1
Sudip Pal
  • 2,041
  • 1
  • 13
  • 16
0

This should help you out

RewriteEngine on
RewriteRule ^/folder1/nisanth.php?id=(.*)$ /folder2/nisanth.php?id=$1 [L,R=301]
Suyash
  • 625
  • 1
  • 5
  • 22