User Tools

Site Tools


custom_error_pages_for_your_site

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
custom_error_pages_for_your_site [2022/02/13 22:33]
jquah
custom_error_pages_for_your_site [2022/02/13 22:35]
jquah
Line 56: Line 56:
  
 Here are two possible ways to let your visitors use either style of URL, and still get your customized error page if they make a typo. They both involve duplication of the hosted content and (possibly manual) sync jobs. (To avoid these complications you might choose to: (a) disable the tilde-style URL --- ''mkhomepg -d'' will remove or insert your $LOGNAME in the ''UserDir enabled ...'' directive near the end of httpd.conf, (b) pare down the folder of the less-popular URL to a simple index.html that performs a redirect, or %%(c)%% try to hack together a workable combination of RewriteCond and RewriteRule directives that plays nicely with the UserDir settings in httpd.conf.) Here are two possible ways to let your visitors use either style of URL, and still get your customized error page if they make a typo. They both involve duplication of the hosted content and (possibly manual) sync jobs. (To avoid these complications you might choose to: (a) disable the tilde-style URL --- ''mkhomepg -d'' will remove or insert your $LOGNAME in the ''UserDir enabled ...'' directive near the end of httpd.conf, (b) pare down the folder of the less-popular URL to a simple index.html that performs a redirect, or %%(c)%% try to hack together a workable combination of RewriteCond and RewriteRule directives that plays nicely with the UserDir settings in httpd.conf.)
-  Delete the public_html symlink created by ''mkhomepg -d'', and make an actual folder of that name in your home directory. Give it and its parent directory loose enough permissions (go+rx should suffice) that the Apache "tilde user" can navigate to it. Periodically synchronize between public_html and html all content EXCEPT the .htaccess file, and make sure each folder's .htaccess gives the correct location relative to the DOCUMENT_ROOT (~/html/.htaccess contains ''ErrorDocument 404 /404.html'', while ~/public_html/.htaccess looks like ''ErrorDocument 404 /~altego/404.html''). +  * **Option 1:** Delete the public_html symlink created by ''mkhomepg -d'', and make an actual folder of that name in your home directory. Give it and its parent directory loose enough permissions (go+rx should suffice) that the Apache "tilde user" can navigate to it. Periodically synchronize between public_html and html all content EXCEPT the .htaccess file, and make sure each folder's .htaccess gives the correct location relative to the DOCUMENT_ROOT (~/html/.htaccess contains ''ErrorDocument 404 /404.html'', while ~/public_html/.htaccess looks like ''ErrorDocument 404 /~altego/404.html''). 
-  Upgrade your membership to MetaARPA and toggle vanity domain hosting to the MetaArray. The tilde-style URL will still resolve to the cluster, where ''ErrorDocument 404 /~altego/404.html'' will continue to work as before. The vanity domain will resolve to mab, where your content must be uploaded again into the appropriate directory, and the htaccess file modified to read ''ErrorDocument 404 /404.html''. With MetaARPA membership you can set up a cronjob to keep the contents of your two html directories (cluster and MetaArray) in sync.+  * **Option 2:** Upgrade your membership to MetaARPA and toggle vanity domain hosting to the MetaArray. The tilde-style URL will still resolve to the cluster, where ''ErrorDocument 404 /~altego/404.html'' will continue to work as before. The vanity domain will resolve to mab, where your content must be uploaded again into the appropriate directory, and the htaccess file modified to read ''ErrorDocument 404 /404.html''. With MetaARPA membership you can set up a cronjob to keep the contents of your two html directories (cluster and MetaArray) in sync.
  
 ===== Other changes you might need ===== ===== Other changes you might need =====
custom_error_pages_for_your_site.txt · Last modified: 2022/02/13 22:35 by jquah