discxpress Posted September 30, 2008 Posted September 30, 2008 As many of you have seen while browsing shopping sites, a direct link to a particular page on the site. It is usually located at the very bottom of the page and begins with phrase such as "Link directly to this page" and a URL is given. I think this would be great for users of OSCommerce that are looking for ways of generating one-way inbound links to their sites. It is great for SEO because it can help improve organic search placement. Here's an example. Go to very bottom of page. It's a gray text. http://www.tower.com/only-by-night-kings-l.../wapi/112395037 Disclaimer I am not affiliated with the site or in no way promoting any of it's products. The above link was provided as a resource to give an example. Thank you for reading and responding.
ktshannon Posted October 1, 2008 Posted October 1, 2008 you would use php and put it in the includes/footer.php <? echo $_SERVER['PHP_SELF']; ?> will display the link
discxpress Posted October 2, 2008 Author Posted October 2, 2008 you would use php and put it in the includes/footer.php <? echo $_SERVER['PHP_SELF']; ?> will display the link Hey thanks. That simple? I thought that would take some in depth coding or possibly a contribution. I will give it a try and post my results. Thanks a million.
discxpress Posted October 2, 2008 Author Posted October 2, 2008 ktshannon, You brought me half way to where I need to be. When I inserted the code you suggested, it just echoed the name of the php file. What I need is the same url that's in the address bar to be echoed in the footer. Thanks for giving me a good start.
discxpress Posted October 2, 2008 Author Posted October 2, 2008 ktshannon, I've completed my mission. I have Ultimate SEO URLs installed. So I used the following: <center>Link to this page: http://www.mydomain.com<? echo $_SERVER['REQUEST_URI']; ?></center> It shows up just as I want it to. Thanks.
ktshannon Posted October 3, 2008 Posted October 3, 2008 gotcha, then what you want to use is this: echo "http" . ((!empty($_SERVER['HTTPS'])) ? "s" : "") . "://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
discxpress Posted October 3, 2008 Author Posted October 3, 2008 gotcha, then what you want to use is this: echo "http" . ((!empty($_SERVER['HTTPS'])) ? "s" : "") . "://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; Ok. I will try that code. It seems more professional. I will let you know how it turns out. Thank you. I'm trying to compete with the big boys. Not quite in their arena.
ktshannon Posted October 3, 2008 Posted October 3, 2008 Hey, to be seen as a big dog, you have to act like a big dog. :) Goodluck with everything. That code will show the full URL of the page your on, sorry I misread it the first time.
discxpress Posted October 5, 2008 Author Posted October 5, 2008 Hey, to be seen as a big dog, you have to act like a big dog. :) Goodluck with everything. That code will show the full URL of the page your on, sorry I misread it the first time. Applied the code. Worked beautifully. Do you think it would be a good idea to upload as a contribution?
ktshannon Posted October 6, 2008 Posted October 6, 2008 Yeah why not, I'll end up doing that tonight and throw in some kudos. Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.