Page 1 of 1

Mass redirect html pages to php?

Posted: Thu May 28, 2009 11:07 pm
by anivad
I recently converted about 200 html pages to php format:

Old URL:
http://mysite.com/dir1/dir2/[b]xx.htm[/b]

New URL:
http://mysite.com/dir1/dir2/[b]page.php?id=xx[/b]

How do I go about doing a mass redirect via .htaccess?

Thanks!

Re: Mass redirect html pages to php?

Posted: Thu May 28, 2009 11:12 pm
by requinix

Code: Select all

RewriteEngine On
RewriteRule (.*).htm page.php?id=$1
That in the /dir1/dir2/ directory should do it.

Re: Mass redirect html pages to php?

Posted: Thu May 28, 2009 11:18 pm
by anivad
Worked. Thanks!