Page 1 of 1

main page redirects to links.php

Posted: Thu Aug 04, 2011 4:16 am
by anewuser
Write your message below:
Hello
I noticed that when i enter my website (eg: www.sample.mysite.com) it will automatically redirects me www.sample.mysite.com/links.php
can you tell me how to remove links.php address so the links can be shown on the main page ?

simply :
I want the links to be shown here : www.sample.mysite.com
instated of here:www.sample.mysite.com/links.php

thanks

Re: main page redirects to links.php

Posted: Thu Aug 04, 2011 7:06 am
by Klemen
This happened because you uploaded linkman files into your main website folder instead into a separate folder (such as "links"). In other words - you overwritten your website with LinkMan files (you even had to confirm that you want to overwrite existing files when uploading)...

You will need to delete the files from the server and upload your homepage again, or check with your hosting company if they have a backup.

Re: main page redirects to links.php

Posted: Thu Aug 04, 2011 7:37 am
by anewuser
Hello
thanks for your respond ,
i am not sure what you are talking about :(

here is the steps i took :
- I downloaded this script
- I created a subdomain called sample
- I uploaded the script in to the subdomain
- I visited the site at www.sample.example.com

the sites redirects to www.sample.example.com/links.php

I read the read me file , and I change the permission to what it asked me

any suggestion?

can i rename links.php to index.php ?

Re: main page redirects to links.php

Posted: Fri Aug 05, 2011 4:26 pm
by Klemen
Ops, sorry, I misunderstood your initial post.

The thing is Linkman doesn't support showing links on a page other than links.php (including links into another page). You could include links on other pages by copying code from links.php file, but I am afraid I don't provide support for such customizations.

Re: main page redirects to links.php

Posted: Sat Sep 03, 2011 1:46 am
by destin2008
Just rename the links.php to index.php
there maybe another file you have to edit and change links.php to index.php but I dont remember which one was it. Other than that is very simple to get rid of that links.php
BTW, in today's online world, pages named link or links are not the best anymore.
It should be renamed to something less spammy,if you know what I mean, more like resources.php
Just like link buying , link exchanges are beginning to be viewed by SE as a way to artificially improve rankings.
Just my 2 cents

Re: main page redirects to links.php

Posted: Fri Sep 16, 2011 5:53 pm
by DC
If you still want to try and include the script instead you can try the following

Link man by default is not really includable, so that may or may not work as expected a few weeks ago I had a buddy of mine try and include LinkMan into his site and it semi worked just that on post it would bounce out of his page this is because the script will need to know what it's posting to, I simplified his problem by moding his script code just a little, this may or may not help with your problem basically to get the script to do a correct include I did the following.

I added PHP_SELF to his code so that it then posts to the page its included into, no mater what the page is called.

So in LinkMan you will see the code that allows you to submit the form.


Something like
<form method="post" action="links.php">

I changed that to
<?php
$self = trim(strip_tags($_SERVER['PHP_SELF']));
echo '<form method="post" action="'.$self.'">'."\n";
?>


Thus allowing us to include the script into another page a bit easier.
When doing so you will want to remove the header footer calls as they will no longer be needed.

Example Highly Modified Version
http://www.clickcraft.net/linktest3.php


Sometimes depending on how a script is used you may have to get the path automatically so that no matter where it is it can still find its path, I write that into scripts when im going to include a script into another and I want it to get the correct paths.

This is something I wrote to get the paths of our data files for linkman in a specially modified includable version I did for a client.

//Lets automatically get the actual dir our included script is in ...
//This is now needed as we are including our script in another page.
$script = (__FILE__);
$scriptn = dirname($script);
$scriptn = substr(strrchr($scriptn, "/"), +1);
$settings['linkfile'] = "$scriptn/".$settings['linkfile'];
$settings['banfile'] = "$scriptn/".$settings['banfile'];


DC