logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: The redirect website creating repeating Characters
Author
mwtoty



Joined: 03 Apr 2018
Posts: 9
Location: US, IN

PostPosted: Thu 05 Apr '18 5:40    Post subject: The redirect website creating repeating Characters Reply with quote

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: 7288
Location: Germany, Next to Hamburg

PostPosted: Thu 05 Apr '18 9:03    Post subject: Reply with quote

Please post the config that you are using to do that.
Back to top
mwtoty



Joined: 03 Apr 2018
Posts: 9
Location: US, IN

PostPosted: Thu 05 Apr '18 23:49    Post subject: Reply with quote

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: 7288
Location: Germany, Next to Hamburg

PostPosted: Fri 06 Apr '18 10:23    Post subject: Reply with quote

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

PostPosted: Fri 06 Apr '18 10:25    Post subject: Reply with quote

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

PostPosted: Fri 06 Apr '18 10:35    Post subject: Reply with quote

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

PostPosted: Sat 07 Apr '18 2:55    Post subject: Reply with quote

Thank you for info. I will test it and split them up.

I will remove _default_ and replace it with *:443.
Back to top


Reply to topic   Topic: The redirect website creating repeating Characters View previous topic :: View next topic
Post new topic   Forum Index -> Apache