• [Mod] Search Engine Friendly URLs aka Short URLs 3 0 5 1
Currently:  

Author Topic: [Mod] Search Engine Friendly URLs aka Short URLs  (Read 727083 times)

0 Members and 1 Guest are viewing this topic.

Offline G4

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #135 on: October 15, 2005, 09:17:24 PM »
the problem is, that google has always two versions of every page in the index.
www.domain.de/search.htm?search_user=G4
www.domain.de/search.php?search_user=G4

or

http://www.domain.de/img1562.search.htm
http://www.domain.de/img1562.htm

the problem is the duplicate content, because img1562.htm and img1562.search.htm are exactly the same pages. what can i do against it?

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: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #136 on: October 15, 2005, 10:35:58 PM »
nothing really...I had the same problem with images that no longer exists, I've tryed send to search engine bots 404 header - nothing, also I had changed my domain and was permanent redirect when access through old domain (header 301 permanent redirect) - 1 year passed, yahoo still using my old domain...they suck!
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 lapinkulta

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • Avatar Essentials
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #137 on: October 17, 2005, 01:41:19 PM »
Hi Vano!

I have still problem with the standard links.

cat1_de.htm etc. works fine.

what doesn't work are the links to register, lightbox, search etc.

They should look like "register_de.htm"
but they look like "register.php" now even without the correct language appended.

I understand what you have done to the original code to solve my problem with the §ext variable, but I have no idea why these standard links do not work now.

Greetings,
lapinkulta
Two hours of try and error can save ten minutes of manual reading.

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: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #138 on: October 17, 2005, 02:36:08 PM »
lightbox? are you sure? register.php is not supported by this code, if you need it, its not that hard to figure it out yourself ;) as of lightbox, I dont know, it should work.
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 lapinkulta

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • Avatar Essentials
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #139 on: October 17, 2005, 06:37:20 PM »
Yes, it shows only lightbox.htm without the language appended which comes from this code piece:

Code: [Select]
        else {
          $url = str_replace('lightbox.php', 'lightbox.htm', $url);
        }

greetings,
lapinkulta
Two hours of try and error can save ten minutes of manual reading.

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: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #140 on: October 18, 2005, 12:10:03 AM »
oh, I've missed these two lines (just upadated the post on previous page).
But you can search for 'search.htm' and 'lightbox.htm' and replace them with 'search'.$ext and 'lightbox'.$ext (be carefull with the quotes!)
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 lapinkulta

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • Avatar Essentials
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #141 on: October 19, 2005, 10:49:28 AM »
thanks, works great now.  :D
Two hours of try and error can save ten minutes of manual reading.

Offline lotus69

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #142 on: October 24, 2005, 12:47:31 AM »
Hi, i would like to add the image name in the URL like this : www.mydomain.com/img,IMAGE-NAME,id.html

i can do it if i add an argument in the url function like this
Code: [Select]
function url($url, $amp = "&", $name ) {
...
$url   = str_replace('details.php', 'img,'.$name.','.$matches[1].'.html', $url);

}


then in details.php, i put this code for previous image link :
Code: [Select]
$prev_image_url = $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$prev_image_id.((!empty($mode)) ? "&mode=".$mode : ""),0,$prev_image_name);

but, honnestly, its very boring to change every "$site_sess->url()" to add the third argument, so does anyone have an idea please ?
i would like to do the same for categories and search

thanks for help


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: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #143 on: October 24, 2005, 02:22:35 AM »
use it like this:
Code: [Select]
function url($url, $amp = "&", $name = "" ) {this way the third argument is an optional ;)
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 Maweryk

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #144 on: October 24, 2005, 02:37:15 AM »
Hi, i would like to add the image name in the URL like this : www.mydomain.com/img,IMAGE-NAME,id.html

i can do it if i add an argument in the url function like this
Code: [Select]
function url($url, $amp = "&", $name ) {
...
$url   = str_replace('details.php', 'img,'.$name.','.$matches[1].'.html', $url);

}


then in details.php, i put this code for previous image link :
Code: [Select]
$prev_image_url = $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$prev_image_id.((!empty($mode)) ? "&mode=".$mode : ""),0,$prev_image_name);

but, honnestly, its very boring to change every "$site_sess->url()" to add the third argument, so does anyone have an idea please ?
i would like to do the same for categories and search

thanks for help



Nice idea :!:
Can you also post the code for categories?

Thanks a lot!

Cheers,

Markus

Offline lotus69

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #145 on: October 24, 2005, 11:49:17 AM »
Thanks V@no :)

Maweryk : i haven't code yet, but it's the same thing.
i'll post a reply as soon as i finish

use it like this:
Code: [Select]
function url($url, $amp = "&", $name = "" ) {this way the third argument is an optional ;)

Offline Matthias70

  • Full Member
  • ***
  • Posts: 199
    • View Profile
    • Bildergalerie
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #146 on: October 26, 2005, 06:17:57 PM »
Hi V@no,

the Mod Short URL you wrote for lapinkulta here:
http://www.4homepages.de/forum/index.php?topic=6729.msg48487#msg48487

works fine for me, but it affects my control-panel.
When I'm trying to search a user or a picture, I get no results when I'm clicking the search-button.

When I restore the session.php. Search function in control panel is O.K. again...

Do you have an idea, why the search in control panel is affected??

edit: BTW The original Short URL Mod works without problems in the Control Panel  :|

Matthias

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: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #147 on: October 27, 2005, 12:00:42 AM »
I have no clue...I just tryed on a fresh 4images and it worked just fine...
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 Matthias70

  • Full Member
  • ***
  • Posts: 199
    • View Profile
    • Bildergalerie
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #148 on: October 27, 2005, 03:03:21 PM »
Hi V@no,
can you test my session.php on your fresh 4images installation?
I added the session.php as a text-file to this message.

Matthias

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: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #149 on: October 28, 2005, 12:03:06 AM »
Seems to work just fine...perhaps something else is interfering...
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)