.htaccess question

Can someone help me to rewrite the .htaccess to make this domain work? =>
http://www.lamparasdegres.com/wp-content/zenphoto/

If I click on an album, I cannot see the pictures (pictures are already there on the ftp). Im thinking I should modify something into the .htaccess but I dont know exactly what.

This is how my .htaccess looks now:

# htaccess file for zenphoto
# NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory.

<IfModule mod_rewrite.c>
RewriteEngine On

# !!! Change this to the web path (eg: http://www.example.com/photos --> /photos) !!!
RewriteBase /wp-content/zenphoto

RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule ^.*$ - [R,L]

RewriteRule ^admin/?$ zen/admin.php [R,L]

RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA]
RewriteRule ^page/([A-Za-z0-9\-_]+)/?$ index.php?p=$1 [L,QSA]
RewriteRule ^([^/]+)/?$ index.php?album=$1 [L,QSA]
RewriteRule ^([^/]+)/page/([0-9]+)/?$ index.php?album=$1&page=$2 [L,QSA]
RewriteRule ^([^/]+)/image/(thumb|[0-9]{1,4})/([^/\\]+)$ zen/i.php?a=$1&i=$3&s=$2 [L,QSA]
RewriteRule ^([^/]+)/image/([^/\\]+)$ albums/$1/$2 [L]
RewriteRule ^([^/]+)/([^/\\]+)$ index.php?album=$1&image=$2 [L,QSA]

</IfModule>

Thanks a lot!

Comments

  • @cynthiamiur-

    Can I make a suggestion? Unless you are a bit more advanced and want to integrate wordpress and zenphoto (which I don't suggest anyway - although some have had success), you will probably want to move your zenphoto installation out of your wordpress wp-content directory. This will make wordpress upgrades much smoother later, and also zenphoto and wordpress will be separate. If you want to display and edit wordpress posts with zenphoto images, simbul has made a nice wordpress plugin called zenpress (get it here) which works well. There is also a zenshow plugin to show random images from zenphoto in wordpress, which may not be easily obtained, but if you're interested, I can send you a link to download the distribution (although I don't know if it works on Wordpress 2.1)

    So in sum, you'll probably want to move your zenphoto directory up one level to your website root, and configure it from there. It'll be much easier. I promise.

    And as always, let us know if we can answer any additional questions.
  • thanks, I will try :)
    is there a way to display an album from Zenphoto into a wordpress page? ot the plugins just allow me to put a single photo from the album into a single post?
  • Thinkdreams,

    thanks for the advice, moving the folder made things better. But I still dont see the picture, take a look at this link:

    http://www.lamparasdegres.com/zenphoto/index.php?album=apliques

    If you click on "Aplique Copa Apagado" you will be redirected to: http://www.lamparasdegres.com/zenphoto/apliques/Aplique+Copa+apagado.jpg and you wont see the picture.

    But if you modify the link to:
    http://www.lamparasdegres.com/zenphoto/albums/apliques/Aplique Copa apagado.jpg
    (adding "albums" after zenphoto and the spaces in the name) you will access the picture.

    I think the problem is in the displayed link. How do u think I can fix it?
  • trisweb Administrator
    You're on an IIS server Cynthia -- you'll have to turn off mod_rewrite in your zp-config.php file.

    Make the line:
    `$zp_conf['mod_rewrite'] = true;`
    into:
    `$zp_conf['mod_rewrite'] = false;`

    IIS does not support .htaccess or mod_rewrite. Also, the paths you're seeing don't correspond to the album directories, they're converted to values for the script, so that's not the problem :-)
  • Damn right! Thanks a lot Trisweb and all of you guys :D
    now it works!
Sign In or Register to comment.