Home htaccess rule for any

# htaccess rule for any

Kieran Rigby
1#
Kieran Rigby Published in 2018-01-12 15:09:05Z
 I am trying to write a htaccess rule that matches anything trailing a slash. For example, I have a rule that listens for /starters-and-alternators And i would like to write another rule that listens for /starters-and-alternators/{anything} So whenever there is a /{anything} present after the starters-and-alternators; it redirects elsewhere. Here's my current rules: RewriteRule ^starters-and-alternators$app/core/code/miscellaneous/allstartersandalts.php%{QUERY_STRING} RewriteRule ^starters-and-alternators/$ app/core/code/miscellaneous/allstartersandalts.php%{QUERY_STRING} 
Kieran Rigby
2#
Kieran Rigby Reply to 2018-01-12 16:19:35Z
 Looks like i've solved it! it is (.+) is what i was looking for. RewriteRule ^starters-and-alternators/(.+)\$ app/core/code/miscellaneous/allstartersandalts.php%{QUERY_STRING} 
 You need to login account before you can post.
Processed in 0.34468 second(s) , Gzip On .