Welcome! Log In Create A New Profile

Advanced

Re: SEO gone mad...

Aleksandar Lazic
October 12, 2015 05:20PM
Hi steve.

Am 12-10-2015 21:59, schrieb steve:
> Hi folks,
>
> I have a requirement from a customer that the terminal slash be
> rewritten when accessing the homepage - eg example.com/ is a 301 to
> example.com

But the solution below will not work due to the fact that most browser
add a trailing / if there is none.
Mybe the customer want to redirect to a 'index-page'?

e.g.: index.php, index.do or to a *_pass?

> I've tried a simple rewrite of ^/$ but that just loops.
>
> Any ideas?

http://nginx.org/en/docs/http/request_processing.html
http://nginx.org/en/docs/http/ngx_http_core_module.html#location
http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#return

location = / {
# this will work for curl but for browsers?!
return 301 http://example.com;
}


BR
Aleks

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

SEO gone mad...

GreenGecko October 12, 2015 04:00PM

Re: SEO gone mad...

Aleksandar Lazic October 12, 2015 05:20PM

Re: SEO gone mad...

Fireye00 October 12, 2015 05:28PM

Re: SEO gone mad...

itpp2012 October 12, 2015 05:54PM

Re: SEO gone mad...

GreenGecko October 12, 2015 06:16PM

Re: SEO gone mad...

Aleksandar Lazic October 13, 2015 05:02AM

Re: SEO gone mad...

Francis Daly October 13, 2015 08:26AM

RE: SEO gone mad...

Lukas Tribus October 13, 2015 06:22AM

Re: RE: SEO gone mad...

itpp2012 October 13, 2015 07:19AM

RE: SEO gone mad...

Lukas Tribus October 13, 2015 08:12AM

Re: RE: SEO gone mad...

itpp2012 October 13, 2015 08:58AM

Re: SEO gone mad...

Gena Makhomed October 13, 2015 10:14AM

Re: SEO gone mad...

Andrew Hutchings October 13, 2015 09:10AM

Re: SEO gone mad...

Patrick Nommensen October 13, 2015 10:18AM

Re: SEO gone mad...

GreenGecko October 13, 2015 03:40PM

Re: SEO gone mad...

nanaya October 13, 2015 03:48PM

Re: SEO gone mad...

GreenGecko October 13, 2015 04:00PM

Re: SEO gone mad...

nanaya October 13, 2015 04:04PM

Re: SEO gone mad...

GreenGecko October 13, 2015 04:14PM

Re: SEO gone mad...

nanaya October 13, 2015 04:16PM

Re: SEO gone mad...

nanaya October 13, 2015 04:22PM

Re: SEO gone mad...

Aleksandar Lazic October 13, 2015 05:48PM

Re: SEO gone mad...

Aleksandar Lazic October 13, 2015 04:48PM

Re: SEO gone mad...

nanaya October 13, 2015 09:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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