Author Topic: Domain Redirect  (Read 7112 times)

0 Members and 2 Guests are viewing this topic.

Offline
*
Domain Redirect
« on: January 09, 2021, 03:31:05 PM »
Hello,
I want to get a pro licence of cwp but i have one question to ask:

When set the server to Apache-Ngnix and Vanish, domain redirect doesn't not work unless using only Apache server. So how can it be possible for domain redirect to work when switched to Apache-ngnix-Vanish server. Or is there any code to use to make domain redirect work when on ngnix. I  mean redirecting from one domain to another. Pls i need answer to  this.

Offline
**
Re: Domain Redirect
« Reply #1 on: January 10, 2021, 11:43:33 AM »
Please check if you have a redirect already captured in .htaccess

Offline
*
Re: Domain Redirect
« Reply #2 on: January 31, 2021, 07:20:41 AM »
Please check if you have a redirect already captured in .htaccess

I have a similar problem, but I have CWP7.pro license and JUST Apache server (no Apache-Ngnix and Vanish) and when trying to redirect a subdomain to a specific page, it's not working.

The .htaccess file looks like:

Quote
RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_HOST} ^www\.subdomain\.domain\.tld$
RewriteRule ^$ "https\:\/\/domain\.tld\/specific-page" [R=301,L]

Offline
*
Re: Domain Redirect
« Reply #3 on: January 31, 2021, 06:10:29 PM »
@josemnunez would you have a workaround for this kind of situations

Please check if you have a redirect already captured in .htaccess

I have a similar problem, but I have CWP7.pro license and JUST Apache server (no Apache-Ngnix and Vanish) and when trying to redirect a subdomain to a specific page, it's not working.

The .htaccess file looks like:

Quote
RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_HOST} ^www\.subdomain\.domain\.tld$
RewriteRule ^$ "https\:\/\/domain\.tld\/specific-page" [R=301,L]

Offline
**
Re: Domain Redirect
« Reply #4 on: March 20, 2021, 07:44:38 AM »
If running Apache and NGINX, nginx is your main Webserver and you need to use the nginx syntax for a redirect, don't try to use htaccess apache syntax.

Nginx Redirects are way simpler, you can open an empty .htaccess and just inserst something like that:

Redirect 301 / https://yournewdomain

thats all you need for an nginx redirect.

This will redirect your whole old domain to a new one.

Offline
**
Re: Domain Redirect
« Reply #5 on: March 20, 2021, 07:47:50 AM »
@josemnunez would you have a workaround for this kind of situations

Please check if you have a redirect already captured in .htaccess

I have a similar problem, but I have CWP7.pro license and JUST Apache server (no Apache-Ngnix and Vanish) and when trying to redirect a subdomain to a specific page, it's not working.

The .htaccess file looks like:

Quote
RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_HOST} ^www\.subdomain\.domain\.tld$
RewriteRule ^$ "https\:\/\/domain\.tld\/specific-page" [R=301,L]

Your solution would be just this:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub\.domain\.com$ [NC]
RewriteRule ^(.*)$ https://www.newdomain.com/$1 [L,R]

Offline
*
Re: Domain Redirect
« Reply #6 on: March 20, 2021, 06:29:28 PM »
Indeed,
Support game me the solution, by selecting "Do not redirect www"
https://prnt.sc/10r1ny0

Offline
*
Re: Domain Redirect
« Reply #7 on: March 24, 2024, 11:57:34 PM »
Indeed,
Support game me the solution, by selecting "Do not redirect www"
https://prnt.sc/10r1ny0

I could not get my subdomain redirected or any redirect I created to work. I read a bunch of forums, thought maybe a glitch and almost thought about rebuilding something, I left it alone for a while, came back, and found this.

Thanks! This worked for me
-The Shoutcast Guru

Radio Streaming Since 2013, RadioDJ since 2016, and Linux-CWP since 2020.