How can I setup dynamic/custom error pages?

If you have defined your own custom Error Pages using the "Define Error Pages" tool within the Control Panel, you may have noticed that you can only define the contents of a non-dynamic file. If you want a tighter integration to your dynamic design, then you can do this by modifying ".htaccess". View the examples below and modify any one of them to satisfy your needs.

Examples:
ErrorDocument 401 http://www.foo.com/files/401.php
ErrorDocument 402 /files/error.php
ErrorDocument 403 http://www.foo.com/cgi-bin/script.cgi
  • 0 Los Usuarios han Encontrado Esto Útil
¿Fue útil la respuesta?

Artículos Relacionados

How do I turn Directory Indexing off?

Add the following to .htaccess:Options -IndexesTurn it back on:Options +Indexes 

How do I do a rewrite instead of a 302 for missing pages?

Use something like this:RewriteEngine onRewriteCond %{REQUEST_FILENAME} !index.htmlRewriteRule /*...

How do I stop off-line browsers/ robot surfers?

Try the following in .htaccess:RewriteEngine OnRewriteCond %{HTTP_USER_AGENT} ^MozillaRewriteRule...

How do I prevent spam from email harvestering?

Use the following in .htaccess:RewriteEngine onRewriteCond %{HTTP_USER_AGENT} ^Bullseye.*...

How do I block a specific domain?

Add the following to .htaccess:order allow,denydeny from fraudster.comallow from all(Change...