![]() |
.htaccess question
I want to configure the below .htaccess for all my websites.
1) Is there a way to do this without individually changing the http://url individually for each website? 2) Is there a way in WHM to automatically add a .htaccess file to all newly added websites on the server? ErrorDocument 400 http://www.mydomain.com ErrorDocument 401 http://www.mydomain.com ErrorDocument 403 http://www.mydomain.com ErrorDocument 404 http://www.mydomain.com ErrorDocument 500 http://www.mydomain.com Hope someone can help :upsidedow |
Create one file and then symlink (man ls) it to all the other directories.
|
Thanks dnsmonster, do you know how I would do this in WHM? I am a newbie :( Also, what would I recode the .htaccess file so that I don't have to change the url each time, example:
ErrorDocument 400 http://www.mydomain.com ErrorDocument 401 http://www.mydomain.com ErrorDocument 403 http://www.mydomain.com ErrorDocument 404 http://www.mydomain.com ErrorDocument 500 http://www.mydomain.com ErrorDocument 400 http://www.mydomain1.com ErrorDocument 401 http://www.mydomain1.com ErrorDocument 403 http://www.mydomain1.com ErrorDocument 404 http://www.mydomain1.com ErrorDocument 500 http://www.mydomain1.com ErrorDocument 400 http://www.mydomain2.com ErrorDocument 401 http://www.mydomain2.com ErrorDocument 403 http://www.mydomain2.com ErrorDocument 404 http://www.mydomain2.com ErrorDocument 500 http://www.mydomain2.com |
Sends them to the root of whichever domain they visited.
ErrorDocument 400 / ErrorDocument 401 / ErrorDocument 403 / ErrorDocument 404 / ErrorDocument 500 / |
Ok thanks, so I do not have to do any /home/name/www thing right? just /?
Also what about configuring in WHM to add this as a default for all domains? Merci! |
All times are GMT -7. The time now is 09:40 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123