apache - Multiple conditions in htaccess -


i have htaccess file grabs pretty after / sign , gives index.php?i. works want take 1 step closer , have same htaccess use conditions. navigation method mysite.com/stuff/cat htaccess grabs string stuff/cat , php can load contents it. want is: when navigation mysite.com/stuff/cat/images want htaccess redirect file rather index.php. possible add kind of if statement or condition in htaccess? (if string contains 'images' redirect gallery.php?i=data)

here current code:

rewriteengine on rewriteoptions inherit rewriterule ^([a-za-z0-9/_\s'-()]+)$ index.php?i=$1 

you can try following (place under rewriteoptions:

rewriterule ^([a-za-z0-9/_\s'-()]+)/images$ gallery.php?i=$1 [l] 

i recommend using l flag (as above) in other rule too.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -