Hard URLs

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

Comments

  • try this:

    global $_zp_current_image;
    $crntimg = $_zp_current_image->getFullImage();
    $HTTP_HOST = getenv('HTTP_HOST');
    $current_image = "http://$HTTP_HOST$crntimg";
  • or you could enable mod-rewrite in the zp-config.php then edit your .htaccess file accordingly. This is obviously apache only..
  • trisweb Administrator
    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.
  • Ah okay, I wondered what all this mod rewrite business was about. I'll look it up, thanks guys :)
  • 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?
  • 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?
  • 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
Sign In or Register to comment.