https://www.example.org to https://example.org wix bluehost - ssl

back story
out domain is on wix.com and hosting on bluehost(it's a wordpress site). we have added A host in wix domain.org with ip. it is working fine.
The ISSUE
we have we want to redirect https://www.example.org to https://example.org
the reason
we want to redirect because when we open https://www.example.org it says our ssl is only for example.org not www.example.org (though www.example.org was working fine with wix hosting)
solutions tried
we have tried adding redirect code to .htaccess but it isn't working tried adding cname to wix ..
we are not sure what to do please do guide us if we are doing it wrong..

Related

Domain Name cannot be changed in Apache on CentOS 7

I have set up a server with a wiki and Wordpress and Nextcloud on a new Domain, let's say it's testing.com. When I was finished, I wanted to change the Domain from testing.com to realdomain.com.
The server is running CentOS 7 with httpd (apache), so I changed the ServerName in /etc/httpd/conf/ to "realdomain.com". Then I changed the VirtualHosts in all the files in /etc/httpd/conf.d.
I added the new Domain to the trusted Domains of the Wordpress, Nextcloud and wiki. I restarted the httpd service and the server itself.
Yet, when I open realdomain.com in browser, it shows me my websites, but it puts testing.com in the address field.
I tried using mod_rewrite to change the URL, but then my webbrowser tells me that the site doesnt redirect correctly and that the redirects never stop.
I tried those rewrite rules in the .conf files and in the .htaccess (not simultaneously)- no success.
I removed all my files in conf.d and created a new DocumentRoot with a simple helloWorld.html - The Url still gets rewritten to testing.com.
Are there any other locations that could have rewrite rules? Did I miss anything?
Thank you so much in advance, this is killing me!

Add www when accessing root domain, not using htaccess file

I have an apache server with some websites built in Wordpress, using vhosts.
The thing is that I have for all of them a configuration like:
ServerName site1.com
ServerAlias www.site1.com
When I access to Site1 through "site1.com" the URL changes to "www.site1.com". The same for Site2, Site3, etc. But for SiteN it's inverse. If I access to "siten.com" it keeps the URL and if you go to "www.siten.com" it changes to "siten.com".
I know I can change this using htaccess file, but my doubt is why some sites has a default and the new site has another default? All the htaccess have the same things and the vhost configuration is the same for all.
Thank you,
Done! The change should be implemented in Wordpress configuration, is not a htaccess issue

Apache Redirect domain.com/dir/slug to sub.domain.com/dir/slug silently without .htaccess

I'm having the darndest time trying to figure this out.
I have a site on a legacy system which will not permit me to alter the .htaccess file at domain.com. I have moved part of this site to a WordPress install located at sub.domain.com. I have to make the URL domain.com/dir/ redirect silently to sub.domain.com/dir/. How can I go about this? I can edit the Apache config files for both domain.com and sub.domain.com, and the .htaccess for sub.domain.com, but not the .htaccess for domain.com
Thanks!
Just add the redirect into the apache config files. In the virtualhost for domain.com:
Redirect 301 / http://sub.domain.com/
If by "silently" (not sure what that's supposed to mean since redirects are involve the browser sending a new request), I'm guessing you want to reverse proxy? Then you'd need to make sure mod_proxy is loaded, then do:
ProxyPass / http://sub.domain.com/

wamp https vhost domain redirects to localhost https

I have setup WAMP on C:\wamp, I followed a tutorial guide to setup HTTPS on my wamp. made ssl with openssl.. I was able to browse https://localhost as well as http://localhost, the problem is, I have set a couple of virtual host domains in httpd-vhost.conf I can browse them normally as in without https BUT when I enter **https**://domain.local it redirects to WAMP **https**://localhost
I simply can't seem to fix it or get a solution online.. what settings could be causing to redirect to https://localhost instead of https://domain.local
I think the problem is in var/wamp/www/yourproject/shared/config/config.php.
Find ('K_REDIRECT_LOGIN_MODE', 4) and change 4 to 3 (html redirect).

How to rewrite paths on single SSL secured subdomain to secure web apps on other subdomains using htaccess

Let's say I have an SSL secured domain at secure.domain.com.
I also have a web application (using silverstripe) at www.domain.com and another at app.domain.com (using CakePHP)
I would like specific areas of www.domain.com and app.domain.com to utilize SSL, and thus must somehow rewrite the paths using the subdomain with the installed SSL certificate.
So for example, secure.domain.com/ss/* should rewrite to www.domain.com/* and similarly, secure.domain.com/app/* should rewrite to app.domain.com/*.
The challenge, however, is that both www.domain.com (SilverStripe) and app.domain.com (CakePHP) have their own complex rewrite rules, and I can't seem to build an htaccess script that successfully retains the functionality of the respective applications...
FYI Assume I have the directory structure /public_html and webroots assigned to the apps as follows:
www.domain.com -> /public_html/subdomains/www
app.domain.com -> /public_html/subdomains/app
secure.domain.com -> /public_html/subdomains/secure
Has anyone accomplished something similar to this before?
The most elegant way is to simply symlink the SSL subdirectory to the apps folder, so they're basically the same directory.
/public_html/app
/public_html/subdomains/secure.domain.com -> /public_html/app
That is, if your host gives you this option.