How to make that when opening http://site.ru/catalog/heroes The same was opened as: http://site.ru/catalog/?cat=heroes ?
1 answer
RewriteRule ^/catalog/([^/]*)/$ /catalog/?cat=$1 [QSA,L] here, the variable? cat = $ 1 will substitute any value specified in ([^ /] *), L - means that after this record the .htaccess reading will be completed, and QSA will allow the transfer of any other data directly (both post and get) given url
- Something does not work (Perhaps because htaccess already has an entry: RewriteCond% {REQUEST_FILENAME}! -F RewriteRule ^ index.php [QSA, L] - user213645
- Please tell me - user213645
- What exactly, perhaps there is a rule suitable for a given with the attribute L - Boris Begun
- now when switching to / catalog / giro / displays error 404 - user213645
- Perhaps you parse url and understands what category? Not enough information to answer qualitatively - Boris Pobezhimov
|