Welcome to WebmasterWorld Guest from 54.159.111.156

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess file

I've looked everywhere

     
5:52 pm on Apr 10, 2006 (gmt 0)

10+ Year Member



I thought I was doing this correctly, but maybe not. My .htaccess file has been rewritten a few times for installations and such, but now my "Redirect gone" won't work, well some of them won't I don't know if its due to the use of %20 for spaces, or that they are pdfs. But the redirect won't work.

Thanks for any help here.

Redirect gone /Templates/sitemap.htm
Redirect gone /Templates/privacy.htm
Redirect gone /Templates/legal.htm
Redirect gone /pages/contact_users_RSVP.htm
Redirect gone /Products/schedule.htm
Redirect gone /Products/personnel.htm
Redirect gone /Products/benefit.htm
Redirect gone /pages/entrylevelsales.htm
Redirect gone /feed.xml
*Redirect gone /PDF%20Files/timecard-text.pdf
*Redirect gone /Files/Cost%20Justification.pdf
Redirect gone /training/survey.htm
*Redirect gone /PDF%20Files/Legiant%20Web%20Timecard.pdf
*Redirect gone /PDF%20Files/Legiant%20Information%20Package.pdf

*these are the ones I am having trouble with

12:01 am on Apr 11, 2006 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I haven't tried this before, but perhaps RedirectMatch, which uses regular expressions, whould be better at handling the spaced-name files:

RedirectMatch gone ^/PDF\ Files/timecard-text\.pdf$
- or -

RedirectMatch gone ^/PDF\%20Files/timecard-text\.pdf$

Otherwise, you could try the same constructs using mod_rewrite:

RewriteRule ^PDF\ Files/timecard-text\.pdf$ - [G]
-or-

RewriteRule ^PDF\%20Files/timecard-text\.pdf$ - [G]

Jim
 

Featured Threads

Hot Threads This Week

Hot Threads This Month