We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

https://site.com to https://www.site.com | Forum

Topic location: Forum home » Support » General Questions
Ash
Ash Oct 6 '19
Hi All


Anyone can pls guide me how to change the url from  https://site.com to https://www.site.com


i tried adding www in config.php in ow_includes but when loading site it says too many redirects


i also tried doing force redirection via inserting below codes in .htaccess but still same error -- "site is redirected too many times"


RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$RewriteRule ^(.*)$ https://site.com/$1 [R,L]



---

Main problem is Cloudflare is not getting activated without www so need to change url


Thanks

Cheers!

dave Leader
dave Oct 6 '19
Try adding a CNAME for WWW in DNS for cloudflare  


WWW    then   site.com   and make it orange (not grey)

Ash
Ash Oct 6 '19
Okkk!! Thank Sir ... let me try
Ash
Ash Oct 6 '19

Quote from dave Try adding a CNAME for WWW in DNS for cloudflare  


WWW    then   site.com   and make it orange (not grey)


Hi Sir - By adding www in cloudflare my default oxwall configuration also needs to be https://www.site.com so 1st i will need to add www to site.. 


So i need change url in oxwall installation... Please guide if you can help me on this..

Ash
Ash Oct 6 '19
Hi


Tried all above still not happening.. can you or anyone please look into my host?

Ash
Ash Oct 6 '19
I even tried deleting histroy clean catches but still no use... the domain i am using is .app may be some thing more is needed! 


PS: meantime i have reversed the settings back since its live

Marcus
Marcus Oct 6 '19
What's your host? 
Marcus
Marcus Oct 6 '19
config.php has to be like this... https://www.plah.app

Now depending on your hosting you either have to use htaccess or cpanel domain forwarding
Marcus
Marcus Oct 6 '19
Check your cpanel for some like domain redirect or forwarding.. Plus locate htaccess and ayeball it fow www 301
The Forum post is edited by Marcus Oct 6 '19
Ash
Ash Oct 6 '19

Quote from Chris_W If the method I posted doesn't work, then there is a problem with one of the following:-

config.php

.htaccess

Cloudflare settings

Your hosting, has some odd setup.

you have added some conflicting statement in the site <head> </head> section.


Who provides your web hosting?


What you said is correct one of the .com site it happened instantly, but its this .app domain which is giving me lot of trouble


I am using a2hoting and i have only put below codes in <head> tags 

<meta name="viewport" content="width=device-width, initial-scale=1.0">


is is the theme which might be creating problem. 



The Forum post is edited by Ash Oct 6 '19
Ash
Ash Oct 6 '19

Quote from Marcus Check your cpanel for some like domain redirect or forwarding.. Plus locate htaccess and ayeball it fow www 301
Hi - if you see above comments its all happening in .htaccess 

Quote from Marcus Check your cpanel for some like domain redirect or forwarding.. Plus locate htaccess and ayeball it fow www 301