Results 1 to 3 of 3

Thread: force 403 error

  1. #1
    Join Date
    Jun 2010
    Location
    Highlands, Scotland
    Beans
    153
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question force 403 error

    hi,

    I would like to force a 403 error to show up when sub.domain.com (Apache server) is used to access my site, I know I could probably create a virtual host making the sub domain point to a file that has not read / write perms but I figure there must be a better way to do this with mod_rewrite or something just not sure how I would do it.

    thanx in advance

  2. #2
    Join Date
    Oct 2006
    Location
    Lüneburg, Germany
    Beans
    199

    Re: force 403 error

    Try this:

    Code:
    RewriteCond %{HTTP_HOST} ^sub.domain.com [NC]
    RewriteRule .* - [F]

  3. #3
    Join Date
    Jun 2010
    Location
    Highlands, Scotland
    Beans
    153
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: force 403 error

    Perfect Thank you.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •