Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Bag-O-Tricks for PHP II


andreasfriedrich - 10:17 pm on Mar 4, 2003 (gmt 0)


>>Where exactly do I place the code?

You need to place the PHP [php.net] right at the top of your code before any output is sent to the browser since we need to catch it all for post processing.

The RewriteRule [httpd.apache.org]s go into either your httpd.conf file if you have root access to your server or the .htaccess file in the root folder of your web site. You should put them right at the top of any other RewriteRule [httpd.apache.org]s since those two rules loop over all parameter in the URL and you most certainly do not want to loop over your other RewriteRule [httpd.apache.org]s as well.

>>Will I only have to include it once on every page

Yes, just once per page at the top of your script. Do NOT put it in every include() [php.net]ed file.

HTH Andreas


Thread source:: http://www.webmasterworld.com/php/334.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com