apache RewriteRule question ?

Discussion in 'Apache' started by rop, Feb 11, 2010.

  1. #1
    Hi,

    We have a site deployed on apache, but (for a specific Virtual host)
    we only want to allow 2 specific URLs, all other requests should be forbidden => [F]

    What is the easiest way to specify this with RewriteRules?

    Example:

    Allow only
    /site/mypage1.htm
    /site/dir2/mypage2.htm
    Only these two URLS should be allowed, evertyhing else should be Forbidden.

    How would you write the RewriteRules/RewriteConds, please?
     
    Last edited: Feb 11, 2010
    rop, Feb 11, 2010 IP