GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   .htaccess question (https://gfy.com/showthread.php?t=420153)

mkx 01-21-2005 01:12 PM

.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

dnsmonster 01-21-2005 01:29 PM

Create one file and then symlink (man ls) it to all the other directories.

mkx 01-21-2005 01:36 PM

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

wahooter 01-21-2005 01:53 PM

Sends them to the root of whichever domain they visited.

ErrorDocument 400 /
ErrorDocument 401 /
ErrorDocument 403 /
ErrorDocument 404 /
ErrorDocument 500 /

mkx 01-21-2005 02:21 PM

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