问题描述:

I have a file located at:

/galeria/a1_files/vlb_images1/phoca_thumb_l_image001.jpg

I want to be able to view it by navigating to the following path on my website:

/galeria/a1/phoca_thumb_l_image001.jpg

Currently I have the following rules in my .htaccess file:

Options FollowSymLinks

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -f [OR]

RewriteCond %{REQUEST_FILENAME} -d [OR]

RewriteCond %{REQUEST_FILENAME} -l

RewriteRule ^ - [L]

RewriteRule ^galeria/a1_files/vlb_images1/([^-]*)$ galeria/a1/$1/ [L,NC]

RewriteRule ^([^-]*)/([^-]*)/([^-]*)$ index.php?page=$1&album=$2&lang=$3 [L]

RewriteRule ^([^-]*)/([^-]*)$ index.php?page=$1&lang=$2 [L]

What do I need to change to make it work?

网友答案:

Try this:

RewriteRule ^galeria/a1/([^-]*)$ galeria/a1_files/vlb_images1/$1 [L,NC]
相关阅读:
Top