Author Topic: changing ROOT_PATH ?  (Read 14165 times)

0 Members and 1 Guest are viewing this topic.

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
changing ROOT_PATH ?
« on: April 05, 2005, 01:58:10 PM »
this is realy bother me
when ever i open the source for any page in the 4images i see this

Code: [Select]
<form method="post" action="./search.html">
and
Code: [Select]
<a href="./index.html">and
Code: [Select]
<a href="./top.html">
and and and ....


i want to see it like this
Code: [Select]
<a href="http://www.site.com/top.html">

so i made my move and i found about ROOT_PATH="./" in the head of every php file like index.php  so i tryed to change it from there but it give me error messge

so what is the corruct way to do this ?

Offline Jo

  • Full Member
  • ***
  • Posts: 130
    • View Profile
    • Jo´s Homepage
Re: changing ROOT_PATH ?
« Reply #1 on: April 05, 2005, 02:19:02 PM »
Why do you wanna change this?  :?:

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: changing ROOT_PATH ?
« Reply #2 on: April 05, 2005, 03:04:29 PM »
Honestly I am confuse
It's all about SEO (Search Engine Optimization)

The purpose of what I am asking is to increase the pages that archived and cached by search engine for my website

The search engine is base by reading the source of the page

So if I have a link like "./search.html" in my page source, dose the search engine read it as it is?
As a broking link?
I think so,
And because of that I want to change it to a full path so it count as I hope

Offline Jo

  • Full Member
  • ***
  • Posts: 130
    • View Profile
    • Jo´s Homepage
Re: changing ROOT_PATH ?
« Reply #3 on: April 05, 2005, 03:25:10 PM »
I don´t think that it is the work worth!
Just to get a better ranking.
Imho you have to public your site in linklists and on other webpages.
Don´t waste your time with this kind of work!

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: changing ROOT_PATH ?
« Reply #4 on: April 05, 2005, 03:45:21 PM »
8O what!!!

Are you serous man?

What I am talking about is one of the most importing things in any website

HOW TO MAKE VISITERS COME TO YOUR WEB SITE?

Every body use search engines every time they need thing from the net
And my job is to ensure that my website is on there rustle list
Not only that
And put my site on the top of there list!!!

This is SEO man and if you don't know it then you are the one who is wasting my time here

Offline Jo

  • Full Member
  • ***
  • Posts: 130
    • View Profile
    • Jo´s Homepage
Re: changing ROOT_PATH ?
« Reply #5 on: April 05, 2005, 03:53:43 PM »
Hey man, cool down!

Have fun with your work!  :wink:

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: changing ROOT_PATH ?
« Reply #6 on: April 05, 2005, 03:58:07 PM »
ok but i hope you read this article
http://www.rustybrick.com/seo_articles_3.php
it's about "Internal Linking Structure"

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: changing ROOT_PATH ?
« Reply #7 on: April 05, 2005, 04:19:51 PM »
this is five good reasons to use absolute links
http://www.searchengineworld.com/newsletter/1999/q3/absolute.htm

Offline Jo

  • Full Member
  • ***
  • Posts: 130
    • View Profile
    • Jo´s Homepage
Re: changing ROOT_PATH ?
« Reply #8 on: April 05, 2005, 04:21:00 PM »
And I hope you read this:
http://www.sitepoint.com/forums/showpost.php?p=1316784&postcount=1
It´s about backlinks.

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: changing ROOT_PATH ?
« Reply #9 on: April 05, 2005, 04:57:22 PM »
that is good thread
my site is full of backlinks
and i am working on improve the SEO on it

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: changing ROOT_PATH ?
« Reply #10 on: April 05, 2005, 05:12:05 PM »
hay Jo
i will give you another good reason to use absolute links in the internal pages

you are using 4images dont you ?
and your site is http://www.joschu.com/

so tell me about your SERP

http://images.search.yahoo.com/search/images?p=site%3Ajoschu.com&ei=UTF-8&fr=FP-tab-img-t&fl=0&x=wrt
it's really look cool
only 18 image is there !!
why is that Jo ?

and for google look at this
http://images.google.com/images?q=site%3Ajoschu.com&hl=en

only 1 images there ?

dont you see something wrong here ?

YES NON OF YOUR IMAGES IN THE GALLERY IS INDEXED  :lol:

so way is that Jo ?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: changing ROOT_PATH ?
« Reply #11 on: April 06, 2005, 01:17:09 AM »
good luck with that, 4images does not support absolute urls, u'll have to change EVERY .php file for that.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: changing ROOT_PATH ?
« Reply #12 on: April 06, 2005, 01:27:27 AM »
hmmm....I've got an idea.

try this:
in includes/constants.php uncomment:
Code: [Select]
// define('SCRIPT_URL', 'http://www.yourdomain.com/4images'); //no trailing slash
(obviosly change the url)

then in includes/sessions.php find:
Code: [Select]
    return $url;Insert above:
Code: [Select]
    return preg_replace("#^".ROOT_PATH."#", SCRIPT_URL."/", $url);It should add "full" path to any links created in 4images.
Images will still use the relative path, for that u'll need replace ROOT_PATH with SCRIPT_URL."/" in global.php:
Code: [Select]
define('TEMPLATE_PATH', ROOT_PATH.TEMPLATE_DIR."/".$config['template_dir']);
define('ICON_PATH', ROOT_PATH.TEMPLATE_DIR."/".$config['template_dir']."/icons");
But I can not guaratee it will not break your 4images...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: changing ROOT_PATH ?
« Reply #13 on: April 06, 2005, 09:03:37 AM »
Vano

You are allows the hero :mrgreen:

Your idea opens my mind to the correct way to do it

I will try your way and I will tell you about the result

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: changing ROOT_PATH ?
« Reply #14 on: April 11, 2005, 04:21:09 AM »
Honestly I am confuse
It's all about SEO (Search Engine Optimization)

The purpose of what I am asking is to increase the pages that archived and cached by search engine for my website

The search engine is base by reading the source of the page

So if I have a link like "./search.html" in my page source, dose the search engine read it as it is?
Yes.  The search engine crawler WILL treat that as a valid link and follow it to index the search.html page.  Without a doubt this is how crawlers work!

Google and all other major search engines have had no problem indexing my entire site and I make it a point to ONLY use relative links as I have a couple of parked domains that sit on my 4images installation.

You do NOT need to change your links to absolute paths that include the http:// portion.