jerrrrry
asked on
need help with rewritting rules
hello i have a question about rewriting rule
i have 4 thumbnails galery that onmouseover display data and picture with ajax it's associated with limits: 5 thumbnails are displayed starting display from limits given trough url, and an arrow able the visitor to see five more.
what i would like is to have a link to each thumb going to the same page than the script info display but displaying picture and infos through a google/ and robots friendly environnment that means no ajax but i would display the <img src="myimage.jpg"> with myimage.jpg coming fom the location url
currenly i use the following rewriting rule:
RewriteRule ^print/([a-z]{2})/([0-9]+) /([0-9]+)/ ([0-9]+)/( [0-9]+)/?$ /print.php?lang=$1&limite1 =$2&limite 2=$3&limit e3=$4&limi te4=$5
RewriteRule ^print/([^/]*) /print.php?lang=$1&limite1 =0&limite2 =0&limite3 =0&limite4 =0
but limits works only for one section (board) at the moment
so i think it will evolve to something longer
and would give a location something like http://localhost/print/en/1/0/0/0/0/myimage.jpg
what do u thing?
would my rewriting rule be like this?
RewriteRule ^print/([a-z]{2})/([0-9]+) /([0-9]+)/ ([0-9]+)/( [0-9]+)/([ a-z])/?$ /print.php?lang=$1&limite1 =$2&limite 2=$3&limit e3=$4&limi te4=$5&lim ite5=$6&im age=$7
RewriteRule ^print/([^/]*) /print.php?lang=$1&limite1 =0&limite2 =0&limite3 =0&limite4 =0
thanks for your precious help
Sans-titre-1.jpg
i have 4 thumbnails galery that onmouseover display data and picture with ajax it's associated with limits: 5 thumbnails are displayed starting display from limits given trough url, and an arrow able the visitor to see five more.
what i would like is to have a link to each thumb going to the same page than the script info display but displaying picture and infos through a google/ and robots friendly environnment that means no ajax but i would display the <img src="myimage.jpg"> with myimage.jpg coming fom the location url
currenly i use the following rewriting rule:
RewriteRule ^print/([a-z]{2})/([0-9]+)
RewriteRule ^print/([^/]*) /print.php?lang=$1&limite1
but limits works only for one section (board) at the moment
so i think it will evolve to something longer
and would give a location something like http://localhost/print/en/1/0/0/0/0/myimage.jpg
what do u thing?
would my rewriting rule be like this?
RewriteRule ^print/([a-z]{2})/([0-9]+)
RewriteRule ^print/([^/]*) /print.php?lang=$1&limite1
thanks for your precious help
Sans-titre-1.jpg
ASKER
i would like
to redirect
print/fr/1/0/0/0/0/folder/ image.jpg
to print.php?lang=fr&galerie= 1&limite1= 0&limite2= 0&limite3= 0&limite4= 0&show=fol der/image. jpg
would it be wise?
maybe i don't need to use a folder/ and use directly the image but in a first time i would like to know how you can use it and redirect it
i would like to display the image using $show,
thanks
to redirect
print/fr/1/0/0/0/0/folder/
to print.php?lang=fr&galerie=
would it be wise?
maybe i don't need to use a folder/ and use directly the image but in a first time i would like to know how you can use it and redirect it
i would like to display the image using $show,
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Your rule:
RewriteRule ^print/([a-z]{2})/([0-9]+)
has 6 capturing groups, but has a backreference to $7 so I believe it would fail with an error.
Could you please give some clarity as to which source URLs you want redirected to which target URLs. eg
"I want to redirect:
print/fr/
to
print.php?lang=fr&limite1=
and
print/fr/5/
to
print.php?lang=fr&limite1=
"