Welcome! Log In Create A New Profile

Advanced

How to remove .html from nginx

Posted by mestresan 
How to remove .html from nginx
June 15, 2010 07:22AM
Hi,

I installed nginx in my server together apache. I have many domains in same host. I am a reseller.

Nginx is really very fast. Incredible. But I have a problem with friendy url's (rewrite). When url contain .html, I need that apache read and htaccess to do use mod_rewrite.

How to remove file extension from nginx read ?
Re: How to remove .html from nginx
June 15, 2010 12:47PM
Why not use nginx's built in rewrite function?

--
Jim Ohlstein
Re: How to remove .html from nginx
June 15, 2010 12:52PM
Jim Ohlstein Wrote:
-------------------------------------------------------
> Why not use nginx's built in rewrite function?


Because I need edit/create config file foreach domain hosted. This is impracticable... because the sites arenĀ“t mine but my customers. There are more 500 domains in same server....

I am searching by method for that works like apache htaccess....
Re: How to remove .html from nginx
June 16, 2010 09:34AM
There is no htaccess support in nginx.

Maybe you can try:

[code]
location ^~ \.html {
proxy_pass http://127.0.0.1:8080;
...
}
[/code]

And have apache listening on 8080. It's possible this will wor. YMMV of course, especially in terms of efficiency, depending at least in part on whether these URI's represent static or dynamic content.

--
Jim Ohlstein



Edited 1 time(s). Last edit at 06/16/2010 09:54AM by Jim Ohlstein.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 98
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready