SEF_URLs plugin for cpg1.5.x - Page 8 SEF_URLs plugin for cpg1.5.x - Page 8
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

SEF_URLs plugin for cpg1.5.x

Started by Joachim Müller, March 26, 2007, 06:56:46 PM

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.

Timos-Welt

Install it and post a link to your gallery please.

pols1337

Gallery link: http://universeofmen.com/charly/index.php

Also, I attached a picture of my Plugin Manager showing that SEF_URL should be installed.

pols1337


enriquei

i really dont know why no one help me here !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
you reply to other post and not to mine
still waiting yr help since many days !!

enriquei


pols1337

Quote from: enriquei on August 10, 2011, 12:59:15 AM
i hope to get your help !

@enriquei I don't think this plug-in works, and it definitely doesn't look like it is supported anymore.  My suggestion is to uninstall it. 

zapotex

Hi All!

I tried to install the plugin, but unfortunately it transforms index.php into index.html, which gives a broken link problem. Is there a simple fix to the .htaccess file to solve this problem?

Thanks everyone!

ZapoTeX

Walkinman

hello Folks,

Is this possible/simple?

I really want a slight adjustment to the the Category section in the SEF plugin

Currently each category is displayed with index-#.html

http://www.skolaiimages.com/stock/index-4.html

Would it be possible to change that to the category name?

http://www.skolaiimages.com/stock/alaska-photos.html

Does that affect any other pages/search functions at all? It doesn't look like it to me. Would it affect the home page, index.html? It'd be good if not, but just the url for each category.

I looked at codebase.php but I don't know what I would have to change.

Thanks so much.

Cheers

Carl

flapane

I think that it would be nice to know if further development has been officially stopped.
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

flapane

#149
I noticed that "most viewed" link shows no photos.
If I use the regular address, I can see the photos in "most viewed" page.
http://www.test.com/gallery/thumbnails.php?album=topn&cat=0 -> works
http://www.test.com/gallery/miniature-popolari.html -> doesn't work

From .htaccess: RewriteRule (.*)popolari(.*) $1topn$2 [NC]

From codebase.php:  $str_topn = 'popolari';
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

purplefreak3

Is there any more support for this plugin, I have used it since 1.5 came out and has always worked wonderfully but then one day it just stopped working and no longer able to use it. If I enable it every link/image you click on will send user to a 404 page but on the other hand not using it any bookmarked links or links from search engines from the SEO links are then sent to a 404 page. I created a special 404 page just for the gallery but would really like to be able to keep using the SEO plugin as made the links readable and users were able to find the content of the gallery much better through search engines.

My site is
http://www.beautifuljodelle.com/gallery/

purplefreak3

Well I got the plugin working again but I can't get the speaking urls to work again though I added the code below but does not give the speaking urls my site link is in above post.

Quote from: Αndré on January 05, 2011, 04:26:36 PM
Please read the docs:     // Configure here
    $sef_language              = 'english';  // set to english, german, french, italian or spanish
    $speakingpic_placeholder   = '-9b6o4';  // set to '' (empty string) to disable speaking URL functionality for files
    $speakingalbum_placeholder = '-65o4c';  // set to '' (empty string) to disable speaking URL functionality for albums
    $speakinguser_placeholder  = '-89occ';  // set to '' (empty string) to disable speaking URL functionality for users
    $number_of_url_chars       = 42;        // max number of chars in speaking URL functionality


purplefreak3


Walkinman

I have a question on this plugin.

Is this a bug?

The plugin is set to work like Jeff says in this thread here

http://forum.coppermine-gallery.net/index.php/topic,75311.msg362718.html#msg362718

He gives an example of how the plugin will display the urls. That example shows a page as

http://www.jjsphotos.co.uk/cpgallery/displayimage-7-25.html

what I'm finding is that if you add anything after the .html, it links to real pages .. when it should not ... obviously if you make that url finish in

http://www.examplewebsite.com/cpgallery/displayimage-7-25.html-howaboutyou

it should give a 404 page; but it doesn't. If you put anything after the ".html" the link still works.

The problem is then if a search engine hits some url with something tacked on to the end (all it took for my site was someone to post 2 links together, with no space between them .. so it went www.siteurl.com/lbum/displayimage-2-23.htmlhttp://www.siteurl.com/display .. and so on ... and the engine then tried to crawl the entire site, with that set of relative links.

Is there someway this can be corrected? I don't know enough about regex, etc, but it seems, from my understanding, that maybe the rewrite code in the plugin should have a "$" after the ".html" so that the re-routed url will ONLY work for .html, and anything after that (or whatever it's supposed to end in) will give a 404. Instead the rules seem to end in ".html(.*)" .. which means anything after the .html actually works. This causes problems.

I've had both Bing and Google crawl my site trying to find thousands upon thousands of links which don't exist, and have never existed. All because they found a link somewhere (google found it through the thread linked below, before Andre edited it) - and then tried to crawl the entire site with that extra piece tacked on the end of the correct urls. I had a thread on this forum asking about it, and the problem ended up being related to how this plugin works.
http://forum.coppermine-gallery.net/index.php/topic,74808.msg360407.html

http://forum.coppermine-gallery.net/index.php/topic,74804.0.html

Those threads both relate to this problem - somehow the engines got "inside" my site and will tack on some weird combination of urls together

mysite.com/stock/thumbnails-106-Juvenile-Bald-Eagle-Photos.html/displayimage-106-1516-Juvenile-bald-eagle-photo.html

You can see that is clearly 2 urls stacked together. If you replace "mysite" with "skolaiimages" you'd see a page that is actually a rendering of my main cpg page ... until I used the Redirect Match to send it to a 410. However, I'll end up having to do this with an almost infinite combination of urls.

Anyway, I hope that makes some sense to someone. I'm still dealing with issues on my site because of this. The plugin is great, but it seems this should be tidied up a bit .... I could be wrong, but that's what I'm seeing from my site, which is www.skolaiimages.com I've corrected the error, months ago, but search engines still try to crawl links that don't exist.

I hope this might be corrected? I'm also unsure what to do about it on my situation at this point.

Thanks so much.

Cheers

Carl

Walkinman

A followup to the above post.

So the relative urls come from the navigation that cpg provides in the SYS Menu and Sub Menu ... so whenever a search crawler finds a bad link, and that page actually displays, all relative links on the page then get messed up.

Part of this problem started when google started following any text that is written with a url in it, even if it's not an actual link. So forums and all kinds of pages out there have a url written with some text after it, or truncate the url, and the search engine tries to crawl that .. and if the page it goes to doesn't show a 404, but shows an actual page (with a bad or wrong url), then, with this plugin, the crawler tries to find all those bad relative links.

Somehow google is trying to crawl a link on my site that says
/stock/thumbnails-53-Alaska-Stock-Phot/

that's a truncated link it got from somewhere around the web. I've now blocked it with a redirect .. but this is an incorrect workaround. There is no page on my site /stock/thumbnails-53-Alaska-Stock-Phot/ anywhere .. but the way this plugin works it causes a problem.

and it then tries to crawl everywhere - such as this one
/stock/thumbnails-53-Alaska-Stock-Phot/login.php?referer=contact.html%3Freferer%3Dindex.html%253Fcat%253D5

I see dozens, if not hundreds, of 404 pages on google webmasters tools once it finds one bad url to my site.

Here's an example. I have this page on my site.

http://www.skolaiimages.com/

stock/thumbnails-51-Bald-Eagle-Photos.html

and you'll come to the bald eagle page. Correctly. Truncate "Photos.html" to something like "Pho.html" and you'll still arrive at the page. This shouldn't work, as far as I can tell.

If anyone who can work on this plugin is interested in resolving this, or at least suggesting how to resolve it, or if its resolvable, your help would be most appreciated. Or, if the plugin is abandoned and no longer supported, maybe that could be cleared up?

I don't want to drop the plugin, as I just spent hours doing a site map and so on, and would need to redo everything if the urls change .. but as it is, it doesn't seem to work correctly.

Thank you.

Jeff Bailey

Try replaceing the contents of your .htaccess with this

##/**************************************************
##  Coppermine 1.5.x Plugin - sef_urls
##  *************************************************
##  Copyright (c) 2003-2007 Coppermine Dev Team
##  *************************************************
##  This program is free software; you can redistribute it and/or modify
##  it under the terms of the GNU General Public License as published by
##  the Free Software Foundation; either version 3 of the License, or
##  (at your option) any later version.
##  ********************************************
##  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/branches/cpg1.5.x/plugins/sef_urls/ht-english.txt $
##  $Revision: 7195 $
##  $LastChangedBy: timoswelt $
##  $Date: 2010-02-03 17:58:36 +0100 (Mi, 03 Feb 2010) $
##  **************************************************/

#Options FollowSymLinks SymLinksIfOwnerMatch

RewriteEngine on

#  Uncomment the following line if your webserver's
#  URL is not directly related to physical file paths.
#  Update "YOUR_COPPERMINE_ROOT" (just / for root)

#RewriteBase /YOUR_COPPERMINE_ROOT

#
# Search and contact
#

RewriteRule search.html(.*) search.php$1 [NC]

RewriteRule contact.html(.*) contact.php$1 [NC]


#
# Rewrite usrmgr urls
#

RewriteRule usermgr-page-([0-9]*).html(.*) usermgr.php?page=$1$2 [NC]

RewriteRule usermgr.html(.*) usermgr.php$1 [NC]

#
# Rewrite index urls
#

RewriteRule index.html(.*) index.php$1 [NC]

RewriteRule ^index-([0-9]*)\.html$ index.php?cat=$1 [NC]

RewriteRule ^index-([0-9]*)-page-([0-9]*)\.html$ index.php?cat=$1&page=$2 [NC]


#
# Rewrite thumbnail urls
#

RewriteRule ^thumbnails-lastupby-([0-9]+)\.html$ thumbnails.php?album=lastupby&uid=$1 [NC]

RewriteRule ^thumbnails-lastcomby-([0-9]+)\.html$ thumbnails.php?album=lastcomby&uid=$1 [NC]

RewriteRule ^thumbnails-lastupby-([0-9]+)-([0-9]+)-page-([0-9]+)\.html$ thumbnails.php?album=lastupby&cat=$1&uid=$2&page=$3 [NC]

RewriteRule ^thumbnails-lastcomby-([0-9]+)-([0-9]+)-page-([0-9]+)\.html$ thumbnails.php?album=lastcomby&cat=$1&uid=$2&page=$3 [NC]

RewriteRule ^thumbnails-([a-z0-9]*)-([\-]?[0-9]*)\.html$ thumbnails.php?album=$1&cat=$2 [NC]

RewriteRule ^thumbnails-([a-z0-9]*)-page-([0-9]*)\.html$ thumbnails.php?album=$1&page=$2 [NC]

RewriteRule ^thumbnails-([a-z0-9]*)-([\-]?[0-9]*)-page-([0-9]*)\.html$ thumbnails.php?album=$1&cat=$2&page=$3 [NC]

RewriteRule ^thumbnails-([0-9a-z]*)\.html$ thumbnails.php?album=$1 [NC]

RewriteRule ^thumbnails-search-(.*)\.html$ thumbnails.php?album=search&search=$1 [NC]


#
# Rewrite displayimage urls
#

RewriteRule ^displayimage-lastcom-([\-]?[0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)-page-([\-]?[0-9]+).html$ displayimage.php?album=lastcom&cat=$1&pid=$2&msg_id=$3&page=$4 [NC]

RewriteRule ^displayimage-([a-z0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)\.html$ displayimage.php?album=$1&cat=$2&pid=$3&uid=$4&msg_id=$5&page=$6 [NC]

RewriteRule ^displayimage-([a-z0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)\.html$ displayimage.php?album=$1&cat=$2&pid=$3&uid=$4 [NC]

RewriteRule ^displayimage-([a-z0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)\.html$ displayimage.php?album=$1&cat=$2&pid=$3 [NC]

RewriteRule ^displayimage-([a-z0-9]+)-([\-]?[0-9]+)\.html$ displayimage.php?album=$1&pid=$2 [NC]

RewriteRule ^displayimage-([0-9]+)\.html$ displayimage.php?pid=$1 [NC]


#
# Rewrite users profiles
#

RewriteRule ^profile-op-([a-z0-9_]+)\.html$ profile.php?op=$1 [NC]

RewriteRule ^profile-([0-9]+)\.html$ profile.php?uid=$1 [NC]
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Walkinman

Hey Jeff

Thanks for that. But, no, that didn't work .. it's closer, I guess, as everything turns to a 404 ... which in some ways is more accurate .. because as the plugin works right now .. if urls aren't correct, the page still displays ... so 404 errors are, in a way, closer to being correct. :)

The way the reg-ex seems to be working is to define the album # (and image # for full size image pages) and then anything after that, followed by .html ... and that's part of the problem .. it should define exactly what the url is, not allow any random combination of text and/or characters.

Further, it's not rewriting things completely. Even with the plugin activated and  running, the dynamic url still loads

site.com/stock/thumbnails.php?album=91

=

site.com/stock/thumbnails-91-Wrangell-St-Elias-Winter-Photos.html

A correct htaccess rewrite, from what I understand, would actually rewrite that url and display the correct url in the toolbar, no?

I'm cautious to uninstall, as I'm uncertain if, after doing that, to test a few things, I can just reinstall or reactivate the plugin and it will work as before? What I worry about is uninstalling it, testing a few things (which will invariably not work, because I don't know anything about this stuff) and then when I try to reinstall it or reactivate it, if it doesn't work I'm in a bigger mess.

I appreciate your help, thanks.

flapane

Hi,
a strange thing I noticed is that the plugin prevents foo.com/bar to be rewrited to www.foo.com/bar

The htaccess in my root folder contains:
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]


This works for the root folder and for the others subfolders but NOT for gallery subfolder.
If I type flapane.com/gallery the url doesn't get rewrited to www.flapane.com/gallery
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

Niecher

I have a question

Would it be possible to extract also the name of the categories?

flapane

Googlebot (but not other bots) screws hundreds of gallery links if this plugin is enabled:
Quote66.249.66.76 - - [07/Sep/2013:06:29:19 +0200] "GET /gallery/mostra-35-1531-_DSC_8162_1280_jpg_.htmlalbums/viaggio-parigi/albums/viaggio-londra/thumb_DSC_6873_1280.jpg HTTP/1.1" 301 180 "-" "Googlebot-Image/1.0"

I don't know from where it grabs and why it appends the bold part.
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com