Wordpress www.mydomain.com redirects to mydomain.com
-
@humptydumpty, thanks, i learned a new thing, so here is my htaccess file
Do you see something that cases the redirect from www.mydomain.com to mydomain.com?BEGIN WordPress
Directivele (liniile) între „BEGIN WordPress” și „END WordPress” sunt
generate dinamic și ar trebui modificate numai prin filtrele WordPress.
Toate modificările la directivele cuprinse între acești marcatori vor fi suprascrise.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>END WordPress
-
@girish thanks for the question
I've purchased a server on linode.
On that server I've installef cloudron.
Then in my cloudron i've installed a fresh wordpress developer module.
Let me know if I can provide more info to support to figure out why there is a redirect. -
@hav81 I had this problem too and I lost my config but I was having luck with using the multi-site enabled with sub-domain however I did not use the root of the sub-domain.
It was:
wp.mydomain.com => set as the app in Cloudron primary URL
used for setup, plugins, users but no real site was herethen add a subdomain on top of:
devsite1.wp.mydomain.com => set as a redirect in Cloudron App
devsite2.wp.mydomain.com => set as a redirect in Cloudron AppIn WP MultiSite I set the URLs to the virutal folders:
/wp
/wp/devsite1
/wp/devsite2For Prod I then had planned on cloning and doing another entry with both:
www.someotherdomain.com www.whatsNot.app (E.G)
and whatsNot.app as additional redirects and set to a cloned new /wp/whatsnotapp/Maybe something like this can be included in the App as an option in setup. I only had to change the two things already mentioned
Multisite = true in wp-config and then .htaccess.
It was easier to map the virutal folders to /media so you could see what was going on as well.
-
@hav81 thanks for sending across the info. I think in your case what is happening is the reverse of what you said.
- If I visit
www.domain.com
, it is still onwww.domain.com
. - If I visit
domain.com
, it redirects towww.domain.com
.
I suspect the source of your confusion is Google Chrome URL bar. Google chrome drops the
www
when it displays the location Please see https://www.bleepingcomputer.com/news/google/google-chrome-hides-www-and-https-in-the-address-bar-again/ . If you click on the URL, you will see that it iswww.domain.com
.Here is your site, after I visited
www.domain.com
:I then click the URL bar, I see the www and https:
The behavior is better in Firefox.
- If I visit