hopefully someone can help me with this as it's driving me crazy.
I want to be able to accept URLs containing a calculation such as:
And rewrite them it this format:
The above case works fine when I use this rewrite rule:
<IfModule mod_rewrite.c> Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteRule ^api/calc/(.+)(\.(txt|sci))?$ calculator/api.php?a=calc&c=$1&f=$2 [L] </IfModule>
But it breaks down for URLs containing special characters, which will be URL encoded. For example 3/3 would be requested using:
I'd like this to rewrite, as before, to:
But it doesn't - I just get an object not found error. I've played around with the 'B' flag and some others, but if they are the correct thing to use, I haven't been using them correctly!
Any pointers greatly appreciated!