Here my .htaccess
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} \/([0-9a-zA-Z]+)$ [NC]
RewriteRule ^(.*) image.php?names[]=%1 [L]
RewriteCond %{REQUEST_URI} \/([0-9a-zA-Z]+),([0-9a-zA-Z]+)$ [NC]
RewriteRule ^(.*) image.php?names[]=%1&names[]=%2 [L]
RewriteCond %{REQUEST_URI} \/([0-9a-zA-Z]+),([0-9a-zA-Z]+),([0-9a-zA-Z]+)$ [NC]
RewriteRule ^(.*) image.php?names[]=%1&names[]=%2&names[]=%3 [L]
RewriteCond %{REQUEST_URI} \/gallery/([0-9a-zA-Z]+)$ [NC]
RewriteRule ^(.*) gallery.php?id[]=%1 [L]
this 2 strings doesn’t work correctly
RewriteCond %{REQUEST_URI} \/gallery/([0-9a-zA-Z]+)$ [NC]
RewriteRule ^(.*) gallery.php?id[]=%1 [L]
When I go to gallery/hgJ56 , I see the content of first 2 strings
RewriteCond %{REQUEST_URI} \/([0-9a-zA-Z]+)$ [NC]
RewriteRule ^(.*) image.php?names[]=%1 [L]
I’m in trouble, can’t understand^, please help! What can I do ?
This rule
will match a string that ends with a
/followed by an alphanumeric string, so it will matchgallery/hgJ56, because it ends with/hgJF6.If the rule is only supposed to match a string that begins with a
/followed by an alphanumeric string, then you can change this rule toand it will not longer match
gallery/hgJ56and your other rule will work.Note that you do not need to escape the
/character i.e.\/and just/are equivalent.You may also want to apply the
^to the rest of your rules in case they also are only supposed to match the start of the string i.e changeto