Htaccess 301 Redirection for Multiple Files?

I suppose you could use some regex to reduce the number of different RewriteRules you are using, as those are all looking the same way In your case, using only this one might be OK : RewriteRule ^(file1|file2|file3|file4)\. Html$ metaboforte.com/$1.php R=301,NC,L This way, you specify exactly what you want to rewrite ; but only have 1 RewriteRule Or, a bit more generic : RewriteRule ^file(0-9*)\. Html$ metaboforte.com/file$1.php R=301,NC,L Which allows you to define that you want to rewrite every fileXYZ.

Html, with XYZ a number. (As I used '*', no number at all would be taken into account by that rewrite rule ; if you want at least one number, you should use '+') You could also do something even more generic -- not sure you want that, but something like this might do : RewriteRule ^(.*? )\.

Html$ metaboforte.com/$1.php R=301,NC,L Here, you are redirecting everything that end with .html.

I suppose you could use some regex to reduce the number of different RewriteRules you are using, as those are all looking the same way. In your case, using only this one might be OK : RewriteRule ^(file1|file2|file3|file4)\. Html$ metaboforte.com/$1.php R=301,NC,L This way, you specify exactly what you want to rewrite ; but only have 1 RewriteRule.

Or, a bit more generic : RewriteRule ^file(0-9*)\. Html$ metaboforte.com/file$1.php R=301,NC,L Which allows you to define that you want to rewrite every fileXYZ. Html, with XYZ a number.(As I used '*', no number at all would be taken into account by that rewrite rule ; if you want at least one number, you should use '+') You could also do something even more generic -- not sure you want that, but something like this might do : RewriteRule ^(.*?)\.

Html$ metaboforte.com/$1.php R=301,NC,L Here, you are redirecting everything that end with .html.

Why not just... RewriteRule ^file(0-9+)\. Html$ metaboforte.com/file$1.php R=301,NC,L Or, if you want to rewrite everything on the old site... RewriteRule ^(.*? )\.

Html$ metaboforte.com/$1.php R=301,NC,L.

Thanks for your post. – Codex73 Aug 31 '09 at 1:09.

Maybe you can try the RewriteMap Directive.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions