htaccess url



  • How to do when you open http://site.ru/catalog/heroes It was the same as: http://site.ru/catalog/?cat=heroes ?



  • RewriteRule ^/catalog/([^/]*)/$   /catalog/?cat=$1 [QSA,L]
    

    The variable ?cat=$1 will be subject to any value specified in ([/]*), L - means that after this recording the reading .htaccess will be completed, and QSA will allow direct transmission of any other data (both post and ghet) on the specified url




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2