homepage Welcome to WebmasterWorld Guest from 54.161.228.29
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
.htaccess file
I've looked everywhere
Kate82




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

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

 

jdMorgan




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved