Can somebody help me to rewrite this?

Hi guys, i really need some help here. I plan to move my forum from the
root
domain to a subfolder named “/forum”

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

To

www.mywebsite.com/forum/showthread.php?t=123456

I hope you guys can help me to find out the rewrite rules.
Thank you!

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,259077,259077#msg-259077

Check this out:
http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite

J.J J Wrote:

Posted at Nginx Forum:
http://mailman.nginx.org/mailman/listinfo/nginx
I need direct url rewrite, not another refference link. Thank you

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,259077,259083#msg-259083

On Sunday, May 24, 2015 05:50:05 AM escavern wrote:

I need direct url rewrite, not another refference link. Thank you

And the mailing list needs requests for advice, not demands to do your
job for you.

We’ll be happy to help if you have questions regarding the
documentation, that has been kindly offered above. Thanks.

Sincerely yours,
Styopa S…

Styopa S. Wrote:

Styopa S…


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx
This is not the first time im asking the question in here, and i did get
direct answer with url rewrites regex. And thanks you are really
helpfull
and skillfull with your answer.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,259077,259110#msg-259110

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 D. [email protected]

Hi escavern.

On 25-05-2015 18:59, escavern wrote:

This is not the first time im asking the question in here, and i did
get
direct answer with url rewrites regex.

Have you also read the suggested links in the past answers?

Here an overview of the past answers.

https://marc.info/?l=nginx&w=2&r=1&s=escavern&q=b

And thanks you are really helpfull
and skillfull with your answer.

To be honest you should think to use N+ with there very good and fast
support

http://nginx.com/products/

or try to learn and understand nginx to be able to solve such easy tasks
by your self.

Cheers
Aleks

PS: I’m not part of NGINX, Inc

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs