https://www.icyphoenix.com/viewtopic.php?f=4&t=2682&p=18932#p18932
-----------------------------------
novice programmer
Sat 25 Aug, 2007 17:15

HOSTING - Modify Php Settings With .htaccess File
-----------------------------------
If you recive a error like this:

[code linenumbers=false]
Allowed memory size of (number1) bytes exausted when tried to allocate (number2) bytes on (file)
[/code]

And "number1" is smaller than "number2", that´s because icy don´t has been configured for a smaller Php allowed memory usage, that is cofigurated in most servers. For solving that:

OPEN [b]"board_root"/.htaccess[/b]
FIND
[codeblock]#php_value memory_limit 32M[/codeblock]
REPLACE WITH
[codeblock]php_value memory_limit 32M[/codeblock]

Important: the 32 can be any other number, but it has to be a multiple of 8.

[hr]

If you need to set the register_globals configuration off (without modifying the php.ini):

OPEN [b]"board_root"/.htaccess[/b]
FIND
[codeblock]#php_flag register_globals 0
#php_flag register_globals off[/codeblock]
REPLACE WITH
[codeblock]php_flag register_globals 0
php_flag register_globals off[/codeblock] 

[hr]

If you want to set the icy board error pages:

OPEN [b]"board_root"/.htaccess[/b]
FIND
[codeblock]#ErrorDocument 400 http://127.0.0.1/errors.php?code=400
#ErrorDocument 401 http://127.0.0.1/errors.php?code=401
#ErrorDocument 403 http://127.0.0.1/errors.php?code=403
#ErrorDocument 404 http://127.0.0.1/errors.php?code=404
#ErrorDocument 500 http://127.0.0.1/errors.php?code=500[/codeblock]
REPLACE WITH
[codeblock]ErrorDocument 400 http://127.0.0.1/errors.php?code=400
ErrorDocument 401 http://127.0.0.1/errors.php?code=401
ErrorDocument 403 http://127.0.0.1/errors.php?code=403
ErrorDocument 404 http://127.0.0.1/errors.php?code=404
ErrorDocument 500 http://127.0.0.1/errors.php?code=500[/codeblock]

Note: You have to put your website instead of "http://127.0.0.1"

[hr]

To disable the rewrite engine (it doesn´t mind what is set in the acp):

OPEN [b][/b]
FIND
[codeblock]RewriteEngine On[/codeblock]
REPLACE WITH
[codeblock]RewriteEngine Off[/codeblock]

[hr]

To sure that you won´t have any error in the domain/subdomain adress:

OPEN [b]"board_root"/.htaccess[/b]
FIND
[codeblock]#Make sure the whole site goes to www.mysite.com instead of mysite.com. This is good for the search engines
#Edit and uncomment the below lines for your own site.
#Make sure to replace icyphoenix.com with your site address.
#RewriteCond %{HTTP_HOST} ^icyphoenix.com
#RewriteRule (.*) http://www.icyphoenix.com/$1 [R=301,L][/codeblock]
REPLACE WITH
[codeblock]#Make sure the whole site goes to www.mysite.com instead of mysite.com. This is good for the search engines
#Edit and uncomment the below lines for your own site.
#Make sure to replace icyphoenix.com with your site address.
RewriteCond %{HTTP_HOST} ^icyphoenix.com
RewriteRule (.*) http://www.icyphoenix.com/$1 [R=301,L][/codeblock]

Note: This time you have to put your Url on the first without the "www." if you have a domain or with the www. if you haven´t one, and in the second in the inverse way.

[hr]


MG, have you thought about, in the file .htaccess, add something to block the characters below?

[code linenumbers=false]
",',<,>,{,},[,]
[/code]


