dilver singh

dilver singh

  • NA
  • 1
  • 720

URL rewriting in .htaccesss.

Apr 25 2015 11:03 PM
Basically it is range problem in .htaccess file  while rewring URL for redirecting 
RewriteEngine on 
RewriteCond %{REQUEST_URI} Delhi/(.*)/([45-600])
RewriteRule Delhi/(.*)/([45-600]) sd/pages/sub_category.php?city=Delhi&Id=$2

But it is not working as it is supposed to be
Actually i want to redirect page if there is any Id from 45 to 600. But is also redirecting ids like 4, 41,42.........49 and so on.
i also tried as bellow 

RewriteCond %{REQUEST_URI} Delhi/(.*)/([(45)-(600)])
RewriteRule Delhi/(.*)/(([45)-(600)]) sd/pages/sub_category.php?city=Delhi&Id=$2
but it didn't work at all
please help asap
Regards.....

Answers (2)