ChangingFile Names and Action

Everything related to CCount PHP click counter
Post Reply
Don Morris
Posts: 1
Joined: Fri Sep 07, 2007 7:23 pm

ChangingFile Names and Action

Post by Don Morris »

Hi,

I just downloaded Ccount yesterday. I want to have an easy place to change affiliate links to ones on my website. So I made the following changes:

(1) I changed the name of "index.php" to "admin.php" (and had to change the name where it occurred in the script 10-11 times).

(2) I changed the name of "clicks.php" to "product.php" (and made the same change in "settings.php").

(3) I uploaded the script into a directory I named "recommend" (so it doesn't say I am tracking clicks). I may change this to "mypicks".

(4) I added a file "index.html" so that when someone entered "http://www.mysite.com/recommend/" they would get a page with a list of "My Picks" instead of the admin panel. I currently have no links there, though.

HERE's MY FEATURE REQUEST:

Currently when you enter
"http://www.mysite.com/recommend/product.php" (WITHOUT the "?id=ID") you get an error messagethatsays the ID is invalid. I would like for anyone who enters the URL to the "product.php" (the renamed "Clicks.php" file) to be redirected to "index.html".

The way the script is currently written it took the person to the admin panel, since it was named "index.php" (I did not want that at all). I don't know enough about mod-rewrite to write a rule that does this. All my efforts failed.

I also looked at the code in "clicks.php" (that I renamed "product.php"). On line 38 there is the condition if the ID field is empty. It is where the error message I get is located. I don't know enough PHP (really, none at all) to change that setting.It seems you still need to use the preg_match function there.

Is there a way to redirect the clicks.php/product.php page to index.html?

And while you're at it, maybe you could create a listof links to show up automatically in "index.php" (the new one, not the current one that is actually the admin panel). You'd probably need to use "index.php" instead of "index.html" for the script to do it for you. r maybe name it something else and let you include it in an index.php page that you set up to match your site's look and feel.

Hope this is clear and you can tell what i am asking about. I think you could re-purpose this script as an affiliate link script if you make the changes I suggest.

Thank you.

Warmly,

Don :)

http://www.donhmorris.com
Post Reply