how to htaccess root directory to return 404

Reply

Join Date: Jul 2008
Posts: 95
Reputation: jakesee is an unknown quantity at this point 
Solved Threads: 4
jakesee jakesee is offline Offline
Junior Poster in Training

how to htaccess root directory to return 404

 
0
  #1
May 27th, 2009
Hi,

Seen many tutorials teaching how to make 404 redirect to an existing page or do a custom 404 page.

How can I do the converse i.e. any file access in the root directory will return a 404?

for example the following files exist, but I want to display 404 error:
http://www.example.com
http://www.example.com/anyfile.html

but these will not cause 404:
http://www.example.com/subfolder
http://subfolder.example.com/
http://www.example.com/subfolder/otherfile.html

My objective is to temporarily disable access to my main website hosted on APACHE + CPANEL, but still allow access to add on domains and subdomains, both manifested as subfolders in the root directory, and use 404 error as a cover.

Thanks for replies.

Jake
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 991 | Replies: 0
Thread Tools Search this Thread



Tag cloud for Linux Servers and Apache
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC