Welcome! Log In Create A New Profile

Advanced

Re: can somebody help me to rewrite this?

Francis Daly
May 27, 2015 06:04PM
On Sat, May 23, 2015 at 03:17:55PM -0400, escavern wrote:

Hi there,

> I need to rewrite from:
> www.mywebsite.com/showthread.php?t=123456
>
> To
>
> www.mywebsite.com/forum/showthread.php?t=123456

If the request is "/showthread.php", then redirect the client to the same
url but with "/forum" prepended -- it looks like that is what you want?

location = /showthread.php { return 301 /forum$request_uri; }

Then configure your nginx-php interaction according to the application
documentation for it to be in a "subdirectory".

Cheers,

f
--
Francis Daly francis@daoine.org

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

can somebody help me to rewrite this?

escavern May 23, 2015 02:55PM

Re: can somebody help me to rewrite this?

J.J J May 23, 2015 08:14PM

Re: can somebody help me to rewrite this?

escavern May 24, 2015 04:57AM

Re: can somebody help me to rewrite this?

Styopa Semenukha May 24, 2015 11:42AM

Re: can somebody help me to rewrite this?

escavern May 25, 2015 12:35PM

Re: can somebody help me to rewrite this?

Aleksandar Lazic May 25, 2015 01:44PM

Re: can somebody help me to rewrite this?

Francis Daly May 27, 2015 06:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 92
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready