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)
-   -   Google Analyics and htaccess files (https://gfy.com/showthread.php?t=822239)

Catalyst 04-15-2008 10:53 PM

Google Analyics and htaccess files
 
Someone told me I can use .htaccess files to call google analytical code.. Has anyone don't this?

Iron Fist 04-15-2008 11:11 PM

Done it, but its tricky because you'll be inserting code into the header... all your scripts in PHP will fuck up..

Catalyst 04-15-2008 11:15 PM

ok.. but on static pages it works good.?

Iron Fist 04-15-2008 11:23 PM

Quote:

Originally Posted by Catalyst (Post 14074038)
ok.. but on static pages it works good.?

Yup, no problem.

Code:

php_value auto_prepend_file "/var/www/domain.com/google.txt"
then make a notepad with the Google code and save it as google.txt where you said in the htaccess file.

Enjoy.

Catalyst 04-15-2008 11:29 PM

thanks..

Yea.. I some of my tours static.. so that would be great..



Quote:

Originally Posted by sharphead (Post 14074062)
Yup, no problem.

Code:

php_value auto_prepend_file "/var/www/domain.com/google.txt"
then make a notepad with the Google code and save it as google.txt where you said in the htaccess file.

Enjoy.


brandonstills 04-16-2008 12:15 AM

That's what footers and layouts are for. So you don't have to modify 300 files when you want to make just 1 change. I hate it when I take over sites and they just copy and paste the same HTML over and over in every file.

Catalyst 04-16-2008 12:21 AM

Yea..

most of my sites have a footer.. and a header...

however I know I can append and prepend..

I am just not sure how to inherit the .htaccess to subfolders

brandonstills 04-16-2008 12:23 AM

Quote:

Originally Posted by Catalyst (Post 14074155)
Yea..

most of my sites have a footer.. and a header...

however I know I can append and prepend..

I am just not sure how to inherit the .htaccess to subfolders

.htaccess already applies to subfolders

NinjaSteve 04-16-2008 12:27 AM

Too bad it messes up the PHP files. A way around that would be golden.

V_RocKs 04-16-2008 04:31 AM

auto_append_file


All times are GMT -7. The time now is 10:53 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123