Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3   Go Down

Author Topic: user's album by url http://site.com/gallery/username  (Read 62455 times)

0 Members and 1 Guest are viewing this topic.

andrewshu329

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • sasphotos.net
Re: user's album by url http://site.com/gallery/username
« Reply #21 on: December 20, 2005, 08:05:34 pm »

Thanks for helping me out everyone, I'm still fairly new to all this.

I forgot to change things around in config after upgrading so I just did that now.

In config, I typed for the fields
URL of your coppermine gallery folder: http://www.sasphotos.net/gallery/
URL of your home page: /gallery/index1.php

The link
http://www.sasphotos.net/gallery/useralb.php
works now.

However, typing in a link such as
http://www.sasphotos.net/gallery/andrew
still doesn't.

So my useralbs.php file shouldnt have any problems, my .htaccess file is ok, mod_rewrite is already enabled, where else could there be a problem?

I'm not sure if I should ask two questions in the same thread, but..does anyone know why http://www.sasphotos.net/gallery/ doesn't forward to the index1.php file (my home page) or even the default index.php file?

Thanks everyone!

PS: Thanks for the heads up nibbler.
Logged
CPG 1.4.2
Apache 2.0.54
PHP 5.0.5
MySql 4.1

Nibbler

  • Guest
Re: user's album by url http://site.com/gallery/username
« Reply #22 on: December 20, 2005, 08:20:21 pm »

OK, do a test. Temporarily change the line in your .htaccess to

Code: [Select]
RewriteRule ^.*$ http://www.google.com
If nothing happens then, it means your .htaccess file is not even being read. If you do get directed with that code, then the file just needs tweaking.
Logged

andrewshu329

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • sasphotos.net
Re: user's album by url http://site.com/gallery/username
« Reply #23 on: December 20, 2005, 08:29:33 pm »

Hi nibbler,
I just saved the changes and nothing happens.
www.sasphotos.net

This is what's in my .htaccess file:
Code: [Select]
RewriteEngine On
RewriteRule ^.*$ http://www.google.com

Thanks,
Andrew
Logged
CPG 1.4.2
Apache 2.0.54
PHP 5.0.5
MySql 4.1

Nibbler

  • Guest
Re: user's album by url http://site.com/gallery/username
« Reply #24 on: December 20, 2005, 08:34:56 pm »

Right, so it's matter of server setup in that case.
Logged

Scenemusic

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: user's album by url http://site.com/gallery/username
« Reply #25 on: December 30, 2005, 04:54:30 pm »

well

i added the code and the .htaccess

I have a gallery under the username Christophe.

Coppermine is in a directory called photobook, the alias set is http://www.linkedscene.com/photo/

if i use

Code: [Select]
RewriteRule ^.*$ http://www.google.com
it works fine and i go immediatly to google.

if i use

Code: [Select]
RewriteRule ^photo/([^\./]+)$ photo/useralb.php?user=$1
it doesn't work (The requested URL /photo/christophe/ was not found on this server).

any idea ?  ???
Logged

AWJunkies

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 130
Re: user's album by url http://site.com/gallery/username
« Reply #26 on: January 15, 2006, 03:15:04 pm »

Quote
I am getting same problems as Scenicmusic. I know it is an issue with the .htaccess file and the redirect. I can manuely put in:
http://www.allwheelphotos.com/cpg143/useralb.php?user=AWJunkies  and it will go to my gallery (so the php file is correct and functional). SO why does it not work when I put in: http://www.allwheelphotos.com/cpg143/AWJunkies  ?? I have tried putting the .htaccess file in root directory of coppermine install which would be (public_html/cpg143/) and I have tried putting it in the (public_html) niether are working but your test with the google .htaccess file works in both of these sections.

Stand alone 1.4.3 Stable

----------------------------------------------------------------------------------------------
I got it to work! Dam awesome mod! Thanks guys. Put the .htaccess file with the following code:

RewriteEngine On
RewriteRule ^([^\./]+)$ useralb.php?user=$1

under your coppermine root directory (public_html/gallery) or (public_html/photos) or in my case (public_html/cpg143)
Hope this helps some of the people who are having issues or would be.

I also have a LOT of mods to share with the community and I will get to it in due time. 

--------------------------------------------------------------------------------------------------------------------------------------
NOW to go even further I changed the .htaccess file too:

RewriteEngine On
RewriteRule ^([^\./]+)$ cpg143/useralb.php?user=$1

and put it into my root directory on server being public_html. This causes http://www.allwheelphotos.com/AWJunkies link to the album for that user rather then having them put in copermine directory. MUCH easier and better for user and looks better. Hope this helps some people as well :)
« Last Edit: January 15, 2006, 03:59:40 pm by AWJunkies »
Logged

andrewshu329

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • sasphotos.net
Re: user's album by url http://site.com/gallery/username
« Reply #27 on: January 16, 2006, 12:41:47 pm »

Hi everyone,
I decided to stop tinkering with .htaccess files and just used the apache config file.
Anyways, now it works as advertised.

However, I was wondering if i can make it so that after typing www.mysite.com/username, the url displayed in the box would remain www.mysite.com/username, instead of immediately changing to something like www.mysite.com/gallery/index.php?cat=10037. Also, so that browsing to the user Gallery through the album list view and such would change the displayed url automatically to www.mysite.com/username, and would remain so as long as the viewer is in that user's gallery.

Thanks.
Andrew
Logged
CPG 1.4.2
Apache 2.0.54
PHP 5.0.5
MySql 4.1

dEnA

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: user's album by url http://site.com/gallery/username
« Reply #28 on: February 13, 2006, 03:52:38 pm »

/useralb.php?user=USERNAME
works for me, but when I try putting the .htaccess file to my server it immediately comes an "500 Internal server error" to the whole site.
No matter whats in that htaccess and where it is. Please help me
thanks
"dEnA"
Logged

dEnA

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: user's album by url http://site.com/gallery/username
« Reply #29 on: February 18, 2006, 07:18:01 pm »

Ok so that solved out to be because of I dont have mod_rewrite and it cant be enabled cause of security issues...
But why doesnt it work to put the php code in the gallerys index.php.
That would make the url to the usergallery more easy
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: user's album by url http://site.com/gallery/username
« Reply #30 on: February 19, 2006, 11:11:52 am »

if you don't have mod_rewrite, then there can't be a feature like that, no workaround possible.
Logged

dEnA

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: user's album by url http://site.com/gallery/username
« Reply #31 on: February 19, 2006, 06:42:37 pm »

Yes, but i meant the useralb.php's code.
Why cant it be put in the gallerys index.
That would make the url to ../gallery?user=USERNAME instead of ../gallery/useralb.php?user=USERNAME
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: user's album by url http://site.com/gallery/username
« Reply #32 on: February 20, 2006, 12:38:01 am »

no difference, the URL will not be any more search engine friendly either way round. If you need that feature, code it. Won't be helpful, as it's not easier to memorize nor more attractive for search engine spiders. Anyway, your question doesn't belong to this thread, please stop replying to it.
Logged

dj_wpa

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: user's album by url http://site.com/gallery/username
« Reply #33 on: March 05, 2006, 03:55:03 am »

Has anyone tried this using IIS on a Windows 2000 server?
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: user's album by url http://site.com/gallery/username
« Reply #34 on: March 05, 2006, 04:06:50 am »

This mod requires using .htaccess, which is specific to apache. You would need to search around to see how to use mod rewrite in IIS.
Logged

Dr Preacox

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 122
  • Is the Matrix...
    • Dynamic Creations
Re: user's album by url http://site.com/gallery/username
« Reply #35 on: May 28, 2006, 09:28:58 am »

Okay well here I go making things hard for myself,

Since my gallery doesn't use private user albums but a Huge public Gallery I needed to modd my code a bit so I changed the following and encountered some problems, just wondering if you could please help.

Useralb.php, now what I have edited in here is I have changed index.php?cat= to profile.php?uid= now the first problem I encounter is, as well as getting the userid I also get 100 before it, which I think is the + FIRST_USER_CAT part of the code, but I cant seem to remove it and get it too work. so is this possible?
Code: [Select]
<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');

header('Location: ' rtrim($CONFIG['ecards_more_pic_target'], '/') .'/profile.php?uid='.(get_userid($_GET['user']) + FIRST_USER_CAT));

?>

And my .Htaccess
Code: [Select]
RewriteEngine On
RewriteRule ^gallery/([^\./]+)$ gallery/useralb.php?user=$1


also I was wondering if in .htaccess I could make the Url as http://USERNAME.dc-6.com and just have it link to http://www.dc-6.com/gallery/profile.php?userid=USERID

if someone could help me with this I will roll it into a short mod and post it for others,
Logged
My Mods:
Making Memberlist Public - VIEW
Different Way of Displaying Categories - VIEW
Coming Soon - Automated Sub Domains -MOD

bitcloud

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: user's album by url http://site.com/gallery/username
« Reply #36 on: November 26, 2006, 02:28:44 pm »

Regarding andrewshu329's idea:
Having "gallery.com/username" staying in the location bar instead of redirecting immediately to "gallery.com/profile.php?uid=1"

I have heard of a "blind redirect"
I don't how anything about this mythical beast, but if anyone's ever set up a blind redirect to keep the location bar displaying "/username", that would be the next logical step for this mod...

anyone know if this is possible?
Logged

bitcloud

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: user's album by url http://site.com/gallery/username
« Reply #37 on: November 26, 2006, 02:45:35 pm »

Edit: This mod is actually a blind redirect as it is - only it doesn't work that way.

Example:
Code: [Select]
RewriteRule ^gallery$ http://www.gallery.com/thumbnails.php?album=3works fine and you'll be left at gallery.com/gallery

but this mod rewrite rules don't leave you at the username, but instead leave you at the dynamic profile.php URL...

any clues on getting this mod to work the same way as a standard blind redirect?
Logged

Nibbler

  • Guest
Re: user's album by url http://site.com/gallery/username
« Reply #38 on: November 26, 2006, 05:30:24 pm »

You can probably do that with a RewriteMap.
Logged

bitcloud

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: user's album by url http://site.com/gallery/username
« Reply #39 on: November 27, 2006, 06:34:31 am »

thanks a heap nibbler... You're always exceptionally helpful - it doesn't go unappreciated...
If I could mod you, you'd have more karma than big mac has calories...

I'll look into it and post my results here
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.026 seconds with 18 queries.