| | |
how to htaccess root directory to return 404
![]() |
•
•
Join Date: Jul 2008
Posts: 93
Reputation:
Solved Threads: 4
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
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
![]() |
Similar Threads
- find root directory (VB.NET)
- open file from root directory (C#)
- Google Crawling Problem (IT Professionals' Lounge)
- how to change the root directory (JSP)
- Blog from scratch permalinks and rss (PHP)
- Open In New Window Php (PHP)
- PHP and XML (PHP)
- [Revised] vBulletin Mod_rewrite Tutorial (PHP)
- another newbie with alot of redhat and apache server Q'S (Linux Servers and Apache)
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: mod_rewrite subdomains
- Next Thread: Debian 5.0 XFCE At A Glance
| Thread Tools | Search this Thread |
.net apache asus bbc bluegene centos cisco citrix cloud cloudcomputing datacenters debian dell desktops development distributions distros drivers economy eeepc energy enterprise fedora gadgets gentoo gos government gpl hardware hp hyper-v ibm iphone java jobs kindle knoppix kvm laptop laptops lawsuits licensing limo linustorvalds linux linuxfoundation linuxmagazine magazines microserver microsoft mobile mobilephones netbook netbooks news novell olpc open openmoko openoffice opensolaris opensource opensuse openvz operatingsystems os patents pc pcworld plathome politics print qumranet redhat rhel robot russia sco server servers slackware software solaris source sun supercomputer support tivo torvalds training tv ubuntu umpc unix virtualization vmware windows x86 xandros xen





