0 votes
25 views
asked by
Hello.

I have use force none-www and ssl.  but have a issue.

www.myweb.com/page1 .   ------> .    https://myweb.com/page1 .   OK.
https://www.myweb.com/page1 .   ------> .    https://myweb.com/page1 .   OK.
myweb.com/page1 .   ------> .    https://myweb.com .   Not ok. no page1 on url but redirect to home page.

Can you help me fix it?

Thank you.
commented by

All default config.
 

# WebinolySSLredirectStart - HTTP to HTTPS Redirect

server {

        listen 80;

        listen [::]:80;

        server_name domain.com www.domain.com;

        return 301 https://$host$request_uri;

}

# WebinolySSLredirectEnd

# WebinolyWWWredirectStart - Force WWW or non-WWW redirect

server {

        listen 443 ssl http2;

        listen [::]:443 ssl http2;

        server_name www.domain.com;

        # WebinolySSLstart

        ssl on;

        ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;

        ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;

        ssl_stapling on;

        ssl_stapling_verify on;

        ssl_trusted_certificate /etc/letsencrypt/live/domain.com/chain.pem;

        # WebinolySSLend

        include common/headers-http.conf;

        include common/headers-https.conf;

        return 301 $scheme://domain.com$request_uri;

}

# WebinolyWWWredirectEnd

# WebinolyNginxServerStart

server {

        listen 443 ssl http2;

        listen [::]:443 ssl http2;

        server_name domain.com;

        # WebinolySSLstart

        ssl on;

        ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;

        ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;

1 Answer

0 votes
answered by Expert
Everything is OK in your Nginx configuration, redirections should be working as expected.

Maybe you are having issue with cache in your browser.

Can you try a different browser?

Regards.
commented by

You are right. work best in different browser and other PC.  lol.

You are the best.  Thank You

Welcome to the Community site for Webinoly.

If you have a question about Webinoly, please ask in English or Spanish.

To report a bug, please ask a question here with the bug tag.

News: Webinoly now have support for the newest PHP 7.3.

Donations

Webinoly Support Paypal Donations Webinoly Support Bitcoin Donations

Your regular donations is what keep this project moving forward. If you like Webinoly, buy me a coffee or a beer to show support.

Affiliate Links

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...