| | |
how to htaccess root directory to return 404
![]() |
•
•
Join Date: Jul 2008
Posts: 95
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
Views: 991 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for Linux Servers and Apache
amazon apache apple asus bbc bluegene centos cisco citrix cloud cloudcomputing code debian dell desktops development distributions distros drivers eeepc energy enterprise fedora fsf gadgets gentoo gnu gos government gpl hardware hp hyper-v ibm java jobs kindle kundra kvm laptop laptops lawsuits ldap licensing limo linustorvalds linux linuxfoundation magazines microserver microsoft mobile mobilephones netbook netbooks news novell olpc open openmoko openoffice opensolaris opensource opensuse openvz operatingsystems os patents pc plathome politics print qumranet redhat rhel russia sco server servers slackware software solaris source stallman sun supercomputer support tivo torvalds training tv ubuntu umpc unix virtualization vmware windows x86 xandros xen





