redirect problem

April 24, 2018 491 views
DNS Ubuntu 16.04

Hello, i have a problem:
i have set the redirect www and no-www in correct mode for my site.
host.com redirect correctly to www.host.com.

if write:
www.host.com/app/ all work and is open the page: www.host.com/app/index.php

but if write whitout www:

host.com/app, the redirect is: host.comapp

how i can resolve this?
thank you

2 Answers

We'd be happy to help you sort this out. Can you share your current redirect configuration so we can take a look?

  • <VirtualHost *:80>
    RewriteEngine on
    RewriteCond %{SERVERNAME} =somehost.com [OR]
    RewriteCond %{SERVER
    NAME} =www.somehost.com
    RewriteRule ^ https://%{SERVERNAME}%{REQUESTURI} [END,NE,R=permanent]
    </VirtualHost>

Have another answer? Share your knowledge.