#1  
Old 28th October 2013, 21:30
undoIT undoIT is offline
Junior Member
 
Join Date: Oct 2013
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default SEO Redirect

The proper way to create a redirect for either www.domain.tld => domain.tld or domain.tld => www.domain.tld is not to use a rewrite but to define a separate server with a return:

http://nginx.org/en/docs/http/conver...ite_rules.html

There is no way to do this properly in ISPconfig. It is necessary to manually edit the /etc/nginx/sites-available/example.com.vhost file. However, any time the website is edited and saved from ISPconfig, the vhost file gets over-written and the separate server definition is lost. Please adjust the Redirect section so that www.domain.tld => domain.tld and domain.tld => www.domain.tld are properly generated, i.e.:

Code:
server {
    listen xxx.xxx.xxx.xxx:80;
    listen xxx.xxx.xxx.xxx:443 ssl;
    server_name www.example.come;
    return 301 http://example.com$request_uri;
}

server {
    listen xxx.xxx.xxx.xxx:80;
    listen xxx.xxx.xxx.xxx:443 ssl;
    server_name example.com;
    root   /var/www/example.com/web;
    ...
}
Reply With Quote
Sponsored Links
Reply

Bookmarks

Tags
redirect, seo

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SEO Redirect visual "bug" MacGoose Developers' Forum 8 11th April 2014 19:15
Redirect not working jjonsson Installation/Configuration 1 19th September 2013 16:20
SEO redirect WWW.mysubdomain.mydomain.tld buffus Installation/Configuration 0 5th September 2013 22:48
CGI variable SERVER_NAME lacks the www prefix despite auto-subdomain and SEO redirect cbj4074 Installation/Configuration 7 10th July 2013 16:01
New feature request: Frame redirect funtion for ISPConfig3 Hans Feature Requests 1 12th January 2011 00:43


All times are GMT +2. The time now is 13:28.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.