I've only started editing rewrite rules a few days ago, before now I'd copy and paste them for each case. I've written a rule which as far as I can tell*, should be matching but isn't
RewriteRule ^/store/(([A-Za-z]+)-Clocks+)/([A-Za-z0-9]+)\.asp($) /store/product/$3? [NC,R=301,L]`
I want this to be able to match domain.com/store/Alarm-Clocks/maf09r.asp and redirect to domain.com/store/product/maf09r/ All I can see in my error log is this:
[Fri May 31 12:08:17 2013] [error] [client IP] File does not exist: /home/user/store/Alarm-Clocks
[Fri May 31 12:09:18 2013] [error] [client IP] File does not exist: /home/user/store/Mantel-Clocks
where /home/user/ is the website root
Is there anything glaringly obvious which I've done wrong?
$3not$4? – NickW May 31 '13 at 11:26([A-Za-z0-9]+)part before .asp but with my severe lack of knowledge, it may not be doing that - Edit, sorry, I misread the question, I've only modified this line by piecing together other rules and trying to learn from them – Jamie Taylor May 31 '13 at 11:31\.asp$– NickW May 31 '13 at 11:35RewriteEngine onin your config before this rule and is this rule inside a<Directory>block or a.htaccessfile? – Ladadadada May 31 '13 at 23:18