Domain Redirect

Started by crystalimited, January 09, 2021, 03:31:05 PM

Previous topic - Next topic

crystalimited

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.

evansa

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

ProComm365

Quote from: evansa on January 10, 2021, 11:43:33 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:

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

ProComm365

@josemnunez would you have a workaround for this kind of situations

Quote from: ProComm365 on January 31, 2021, 07:20:41 AM
Quote from: evansa on January 10, 2021, 11:43:33 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:

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

Painkiller88

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.

Painkiller88

Quote from: ProComm365 on January 31, 2021, 06:10:29 PM
@josemnunez would you have a workaround for this kind of situations

Quote from: ProComm365 on January 31, 2021, 07:20:41 AM
Quote from: evansa on January 10, 2021, 11:43:33 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:

QuoteRewriteEngine 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]

ProComm365

Indeed,
Support game me the solution, by selecting "Do not redirect www"
https://prnt.sc/10r1ny0

SHOUTcast Guru

Quote from: ProComm365 on March 20, 2021, 06:29:28 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.