Member
Member
SubJunk   2007-01-06, 12:37
#1

Hi, is there a way to have zenphoto generate URLs that are normal instead of PHP queries? So instead of having, say, "index.php?image=blabla" it would be "/image/blabla"?
I seem to remember some way of doing that, or am I just imagining things?
The problem is of course that search engines only see my site as consisting of one page, which isn't too good.
Cheers

Member
Member
pearofducks   2007-01-06, 13:34
#2

try this:

global $_zp_current_image;
$crntimg = $_zp_current_image->getFullImage();
$HTTP_HOST = getenv('HTTP_HOST');
$current_image = "http://$HTTP_HOST$crntimg";

Member
Member
Chilifrei64   2007-01-06, 15:55
#3

or you could enable mod-rewrite in the zp-config.php then edit your .htaccess file accordingly. This is obviously apache only..

Developer
Developer
trisweb   2007-01-06, 20:26
#4

Correct, that's what mod_rewrite does. You need to have apache, the mod_rewrite module, and a correctly configured .htaccess for it to work. There are a lot of posts on the forums if you need help.

Member
Member
SubJunk   2007-01-07, 00:49
#5

Ah okay, I wondered what all this mod rewrite business was about. I'll look it up, thanks guys

Member
Member
SubJunk   2007-01-07, 02:07
#6

Okay I've never used this before... I have the link URLs working, but having a little trouble with the image ones.
I'm using, for example:
RewriteRule ^(.*)/image/thumb/(.*) /zen/i.php?a=$1&i=$2&s=thumb
Sorry if that looks silly, haha What's wrong with it?

Member
Member
SubJunk   2007-01-07, 02:09
#7

My URL ones that are working are:
`RewriteRule ^(.)/(.).php /index.php?album=$1&image=$2

RewriteRule ^(.*)/ /index.php?album=$1`
Is that how they are supposed to be?

Member
Member
SubJunk   2007-01-07, 03:23
#8

Ohh I see it's already in the htaccess file. I wasn't using the htaccess that came with zenphoto. Sorry for the silly questions haha

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.