Question:

Htaccess problem (simple im sure!)

by  |  earlier

0 LIKES UnLike

Hello,

I have a simple rewrite headache.... Here is my line:

RewriteRule ^img/photos/(. )/thumbs/(. )$ index.php?display=photo&view=$2&album=$1

I try to load this URL:

mysite.com/img/photos/

my-album-2008/thumbs/

IMG_6575.jpg

(obviously no line breaks - had to do this cos YA cuts long lines)

and in my index.php i do a:

echo $_GET["album"]

and it outputs:

my-album-2008/thumbs

I am expecting it to output:

my-album-2008

arrrgh! any suggestions?

Report this post

 Tags:

   Report

1 ANSWERS


  1. i've just tested with something very similar and it worked fine, try puting an asterisk in your regex expressions instead of a space:

    RewriteRule ^img/photos/(.*)/thumbs/(.*)$ index.php?display=photo&view=$2&album=$1

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions