Author |
|
mwtoty
Joined: 03 Apr 2018 Posts: 9 Location: US, IN
|
Posted: Thu 05 Apr '18 5:40 Post subject: The redirect website creating repeating Characters |
|
|
Hello, I'd like to ask if anyone has encountered this scenario.
I tried a URL redirect, when the redirect website from the browser creates repeating
Characters. Please see below:
HTTPS://abc.com/newnewnewnewnewnewnewnewnewnewnewnew
Thank you very much |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7375 Location: Germany, Next to Hamburg
|
Posted: Thu 05 Apr '18 9:03 Post subject: |
|
|
Please post the config that you are using to do that. |
|
Back to top |
|
mwtoty
Joined: 03 Apr 2018 Posts: 9 Location: US, IN
|
Posted: Thu 05 Apr '18 23:49 Post subject: |
|
|
Hi, thank you for responding. I realized I didn't include the config. Please see config:
<VirtualHost _default_:443>
# General setup for the virtual host
DocumentRoot "C:/Apache/htdocs"
ServerName abc.com:443
ServerAdmin admin@abc.com
ErrorLog "C:/Apache/logs/error.log"
TransferLog "C:/Apache/logs/access.log"
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
ServerName url.xyz.com
Redirect / https://abc.com/new
</VirtualHost>
Thank you very much. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7375 Location: Germany, Next to Hamburg
|
Posted: Fri 06 Apr '18 10:23 Post subject: |
|
|
The issue is that you can not combine _default_ with a ServerName. Use one catch all vhost with _default_ and define all other vhosts with
<VirtualHost *:443> and ServerName |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Fri 06 Apr '18 10:25 Post subject: |
|
|
You got a loop going. Split those up into two different vhosts.
There is actually two problems here but I got timed out and lost the post explaining them. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Fri 06 Apr '18 10:35 Post subject: |
|
|
James Blond wrote: | The issue is that you can not combine _default_ with a ServerName. |
Well you can but because it's the _default_ it will answer any request to the IP if no vhost for said hostname is configured anyway.
ServerName url.xyz.com overrides ServerName abc.com so abc.com doesn't really exist, hence the loop. |
|
Back to top |
|
mwtoty
Joined: 03 Apr 2018 Posts: 9 Location: US, IN
|
Posted: Sat 07 Apr '18 2:55 Post subject: |
|
|
Thank you for info. I will test it and split them up.
I will remove _default_ and replace it with *:443. |
|
Back to top |
|