Forum Moderators: phranque

Message Too Old, No Replies

Redirect.with exclusions

         

lstrange

2:55 pm on Oct 21, 2011 (gmt 0)

10+ Year Member



Hi - I've only done basic redirects in my .htaccess file, so trying to figure this one out.

I have a folder with thousands of files in it.

I need to redirect most of the files to one main page on another site, but I need to do some custom exclusions for certain files in that same folder.

These exclusions below should not redirect(the star being the wildcard characters):

CT*.html
SF*.html
AC*.html
acc*.html

I just can't seem to get my syntax right.

If there's a similar example, I'd be happy to take a look, I just had trouble finding one. The rewrite module is not enabled on the server I'm on.

Thanks for any help you can provide. Lainie

g1smd

7:40 pm on Oct 21, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What have you tried so far?

If it didn't use a RewriteCond and a RewriteRule then it was the wrong aproach.

Do all of the URLs to be redirected end in .html or are there multiple extensions to be redirected?