Welcome! Log In Create A New Profile


Rewrite rule problem

Posted by jacek44 
Rewrite rule problem
March 15, 2015 03:21PM
I've got problem with making rewrite rule in nginx and i need your help. How to make rewrite rule from http://www.example.com/2015/03/link-to-page.html to http://www.example.com/link-to-page/ .
I've tried this
location / {
rewrite "^/([0-9]{4})/([0-9]{2})/(.*)\.html?$" /$1/ redirect;
but it's not working.
Thank you
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 322
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