Hi,
i want disable .htaccess for all hosts,
if some upload or make new file name by .htaccess Automaticaly deleted or hided and get error 500 to this host
i dont want it work on my server
Hi,
i want disable .htaccess for all hosts,
if some upload or make new file name by .htaccess Automaticaly deleted or hided and get error 500 to this host
i dont want it work on my server
You would probably need to write a custom script which runs via cron on a regular basis to find all .htaccess files and delete them
But, bear in mind that you'll probably break many user's websites by doing this
- cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill
- Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program
- Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting
SoftDux- The Leaders in Software
Use the coupon: cpanel-06 to get 20% off our packages
i dont want find htaccess from websites, if i delete them , hosts can make new one again, i want disable .htaccess
Hello,
You should have a section similar to the following:
Whatever it has listed for AllowOverride line, change to:Code:<Directory "/"> Options All AllowOverride All </Directory>
At that point, then distill the changes, rebuild Apache and restart Apache:Code:AllowOverride None
No further .htaccess files should work after this is set. It basically stops overrides at / level and higher using .htaccess files.Code:cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110802 /usr/local/cpanel/bin/apache_conf_distiller --update /scripts/rebuildhttpdconf /etc/init.d/httpd restart
cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
-- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support
Submit a ticket | Check an existing ticket
thanks
but how i can active htaccess just for one host or tow?
You cannot. It is one or the other.
Also, your original request did not include this:
It is probably possible to give another <Directory "/pathtodirectory"> option to allow AllowOverride, but I didn't test that option, since it wasn't what was asked.i want disable .htaccess for all hosts,
...
i dont want it work on my server
Edit: So, upon testing, this works:
This would again need to be distilled, Apache rebuilt and Apache restarted. The username in the path would need to be revised to the actual cPanel username. At that point, the account in question can have an .htaccess file working.Code:<Directory "/"> Options All AllowOverride None </Directory> <Directory "/home/username"> Options All AllowOverride All </Directory>
cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
-- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support
Submit a ticket | Check an existing ticket
i test it, and working, before test it i have some problem, .htaccess showed from some host, and hided from some hosts some
from some hosts when i make htaccess it get hided Automatically
but from some host showed but ddt work
what is the problem of that?
from my friend server when some one upload .htaccess this Host Automaticaly get Error 500
how he do that?
Unfortunately, I am unclear on what is being asked this time. Please try to be clear with proper grammatical sentences on what is needed or being requested.
The above method should be working for what was asked already. If this is not sufficient for reaching the goal required, when it does actually work to provide no .htaccess allowed for most accounts and allow some to use one, then I cannot really say why anything else is needed at this point.
cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
-- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support
Submit a ticket | Check an existing ticket
u can try this code to avoid such a problem
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110802
/usr/local/cpanel/bin/apache_conf_distiller --update
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart
I had already provided those same commands earlier when noting how to distill changes upon revising the AllowOverride section of httpd.conf file. I'm not certain if that was what was being asked by bt4
cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
-- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support
Submit a ticket | Check an existing ticket