This is my first question here and all I can say is that I am really glad to be part of this community.
Now, as part of the question. I have a small problem configuring my htaccess properly, I have tried numerous lines of code which I have found here and there, trying my best to come close to something relevant or close to what I want, but no matter what.. I was failing. I tried redirect, redirect 301, both with and without full links, rewrite url with and without extension in the end but nothing happened.
So, what's my question exactly.
I have a form which when somebody clicks on the "send" button, the form tries to launch a file. It produces the following link:
domain.com/api/services/notification/send.php?accept=json&contentType=json&appUrl=http://domain.com
Although, while I have send.php
under api/services/notification/
it's not called at all because there's no extension when the form produces the link, resulting in a 404 error. So, I tried several times to make .htaccess
to redirect send into send.php
but every time I was facing a huge fail. My assumption is; because it's within other letters/words. Mainly, I want .htaccess
to "replace" send
into send.php
without affecting the rest of the URL, using mod_rewrite
.
Any insights on this? The last code which I hoped that would work but didn't at all, was this one:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^send?([^/]+) /send.php?accept=json&contentType=json&appUrl=http://domain.com [NC]