Mobile app version of vmapp.org
Login or Join
Gloria169

: If mod_rewrite is enabled on your server you may create following .htaccess file in the folder root_folder/xpto.com/: RewriteEngine on RewriteCond %{HTTP_HOST} mainsite.com$ [NC] RewriteRule .* -

@Gloria169

If mod_rewrite is enabled on your server you may create following .htaccess file in the folder root_folder/xpto.com/:

RewriteEngine on
RewriteCond %{HTTP_HOST} mainsite.com$ [NC]
RewriteRule .* - [F]


This will check if the request URL ends with mainsite.com and deny access if it does.

EDIT: If you want to return a 404 Not Found, you may use this RewriteRule (first two lines stay the same):

RewriteRule .* - [R=404]

You can also insert other HTTP status codes instead of 404 (but replace the dash with an actual URL for redirects).

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Gloria169

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme