Forums

[resolved] RewriteRule for Missing Pages (4 posts)

  1. am1us
    Member
    Posted 1 year ago #

    I have worked on this for too many hours and although it seems like it should be simple, I'm crying uncle.

    I used to have a bunch of PDF files located under a directory named Papers. When I moved over to WordPress, I put these papers (many of them) in a different password-protected directory. I have no difficulty writing individual Rewrite 301 instructions for each file, but there are too many to do this way.

    I need a RewriteRule that sends anyone looking for any file under the old Papers directory (http://www.mywebsite.com/Papers/*.*) to a single landing page in my WordPress site.

    Someone's help would be MOST appreciated! Thanks.

  2. zoonini
    help me help you
    Posted 1 year ago #

    How about this?

    RedirectMatch 301 ^/Papers/.*$ http://www.your-domain.com/your-landing-page

    EDIT: untested, use at your own risk. ;-)

  3. am1us
    Member
    Posted 1 year ago #

    Thank you so very much! That did the trick.

  4. zoonini
    help me help you
    Posted 1 year ago #

    Glad it worked!

    If you would please mark this thread as "resolved" (drop-down menu in the right column) it would be appreciated. Helps everyone keep better track of whose issues are still outstanding. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic