Welcome! Log In Create A New Profile

Advanced

Need help with rewrite rule

Posted by aabb11 
Need help with rewrite rule
February 25, 2014 06:41AM
Hello, I'm new in this forum because I really need someones help :)
I'm having the following problem with migrating a .htaccess-rewrite for using it with nginx:
.htaccess:
RewriteBase /mobile_api/
RewriteRule ^(\d{0,3}[.]?\d{1,3}[.]{1}\d{1,3})/([^/]*)/([^/]*)\.([^/]*)$ /mobile_api/index.php?version=$1&controller=$2&action=$3&format=$4 [L,QSA]

The following URL is requested:
https://example.com/mobile_api/1.0/Orders/get_new_list.json/
and should redirect to:
https://example.com/mobile_api/index.php?version=1.0&controller=Orders&action=get_new_list&format=json

I already tried to convert it with winginx.com/htaccess and with https://timmehosting.de/htaccess-converter, but the results didn't work for me...
Here is a result from timmehosting after converting:
rewrite "^/(\d{0,3}[.]?\d{1,3}[.]{1}\d{1,3})/([^/]*)/([^/]*)\.([^/]*)$" /mobile_api/index.php?version=$1&controller=$2&action=$3&format=$4 last;

That doesn't work for my case. I usually use Apache, but I really want to use NginX instead.
I really hope that someone can help me.

Greets,
aabb11



Edited 2 time(s). Last edit at 02/25/2014 06:47AM by aabb11.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 152
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready