Author Topic: Error on website with www  (Read 1643 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Error on website with www
« on: October 28, 2023, 06:31:21 PM »
Hello, when I created my website account I submitted the account with www and now when I enter the website without the www I have an error, even though I have the SSL redirecting fine.

https://www.askthesoul.com/ > This is how it works
https://askthesoul.com/ > Does not work


Image > https://freeimage.host/i/JfBhbQj

Offline
**
Re: Error on website with www
« Reply #1 on: October 28, 2023, 07:09:42 PM »
hi,

if you use apache you could use a rewrite rule, to force all requests to be redirected to www.

In this case you would never have problems when your visitors just enter the domain without www.

just add this to the .htaccess file of your page:

RewriteEngine On
### re-direct to www
RewriteCond %{http_host} !^www.example.com [nc]
RewriteRule ^(.*)$ http://www.example.com/$1 [r=301,nc]

Offline
*
Re: Error on website with www
« Reply #2 on: October 28, 2023, 07:40:02 PM »

I had already added something like this and I just put your code changing my domain at the end of the file and it doesn't do anything.

I think it was to create the website account with www.

Is there a way to remove the www from the account?


hi,

if you use apache you could use a rewrite rule, to force all requests to be redirected to www.

In this case you would never have problems when your visitors just enter the domain without www.

just add this to the .htaccess file of your page:

RewriteEngine On
### re-direct to www
RewriteCond %{http_host} !^www.example.com [nc]
RewriteRule ^(.*)$ http://www.example.com/$1 [r=301,nc]

Offline
*****
Re: Error on website with www
« Reply #3 on: October 28, 2023, 08:29:22 PM »
The correct thing would be to delete the account and create it again without the www, this can cause countless problems later

Offline
*
Re: Error on website with www
« Reply #4 on: October 28, 2023, 08:47:48 PM »
The correct thing would be to delete the account and create it again without the www, this can cause countless problems later

And is there no way to edit the account and remove the www?

Do I really have to delete the account and install a backup?

Offline
*****
Re: Error on website with www
« Reply #5 on: October 28, 2023, 08:50:00 PM »
Yes, you must edit the domain name in
root_cwp.user
postfix.*
Edit vhosts in Apache and any other webserver

Offline
*
Re: Error on website with www
« Reply #6 on: October 29, 2023, 10:46:02 AM »
Could you tell me where I can find these files to change or give me step by step instructions on how to do so?


Yes, you must edit the domain name in
root_cwp.user
postfix.*
Edit vhosts in Apache and any other webserver