Welcome! Log In Create A New Profile

Advanced

Re: Proper way to convert an apache rewrite rule

Aleksandar Lazic
June 04, 2017 06:32PM
Hi ST.

ST wrote on 04.06.2017:

> Hello,

> I'm new to nginx and try to move an old website from apache to nginx.
> While getting rid of the .htaccess file I've encountered following
> rewrite rule:
>
> RewriteCond %{QUERY_STRING} id=([^&]*) [NC,OR]
> RewriteCond %{QUERY_STRING} daily=([^&]*) [NC]
> RewriteCond %{REQUEST_URI} !mobSpecCycle [NC]
> RewriteCond %{REQUEST_URI} !mobSpecTheme [NC]
> RewriteRule ^rss\/mobSpec([^\/]+)/?$ /rss/mobSpec$1/mobSpec$1_%1.html
> [QSA,NC,L]

> Could you, please, help me to convert it to nginx "the right way"?

You have at least 2 options.

https://winginx.com/en/htaccess
http://nginx.org/en/docs/http/converting_rewrite_rules.html

> Thank you in advance!

--
Best Regards
Aleks

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Proper way to convert an apache rewrite rule

ST June 04, 2017 03:58PM

Re: Proper way to convert an apache rewrite rule

Aleksandar Lazic June 04, 2017 06:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 117
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready