Redirect 404 errors to the home page

Hi,

Ive received a request stating that the website owner wants all 404
error
messages redirected to the home page as its affecting their seo
ranking(im
not sure about this myself but thats another issue). Its a rails
application
so i have static page displayed currently and even applied some
javascript
to redirect to the home page but the seo tool still states there are X
amount of broken links and that redirecting to the home page via the
server
config will fix this.

I cant seem to get this to work in the nginx config, can anyone help me?
Ive tried various solutions but nothing is working 100%.

Posted at Nginx Forum:

On 4 April 2013 11:40, johnnybut7 [email protected] wrote:

I cant seem to get this to work in the nginx config, can anyone help me?
Ive tried various solutions but nothing is working 100%.

Module ngx_http_core_module with
Module ngx_http_proxy_module should do what you want.
Let us know how you get on.

Jonathan

Thanks, ive already used this resources trying the below but it doesnt
make
a difference, the rails static page is still being served. I think
maybe i
need to disable that first, thanks for your help.

error_page 404 =301 http://example.com/notfound.html;

Posted at Nginx Forum: