Re: Problem with Redirect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Define specific customlog entries for your virtualhost, you will see they don't get any entries, another virtualhost is grabbing those requests and the redirect as you can see is not happening.

apachectl -S as has been previously said would have helped you, but you just "grepped" it, it's not just about names, it can also be about greedy virtualhost name matching. Share it here so we can see.

Also note Redirect would send a 30x response so you are definetly not landing in that virtualhost, note Redirect redirects "all" and appends that to the target, but looking at the whole directive it seems you want RedirectMatch ^ https://www.def.com/ghi#about instead.

So, briefly: 
review "apachectl -S" again
add spceific customlog entry for this virtualhost when it grabs the requests you should see entries in it, otherwise it will remain empty.
Make sure your redirect is correct.

@mitchel why use those convoluted rewrite directives, why check for port 80? it is already a port 80 virtualhost, why check if it has www? that can be handled through servername and serveralias, and the objective of the virtualhost is external redirect,  appending query string? but not appending the original request? etc.. 
Seriously, people should stop using mod_rewrite by default for the most simpleton tasks filling the configuration with unneeded garbage. It is bad advice and just contributes to send the idea all configurations in httpd have to be convoluted and ugly for the most simple tasks (which is false).

2017-07-08 18:11 GMT+02:00 Blake McBride <blake1024@xxxxxxxxx>:
The tool returned:

>>> http://abc.com

> --------------------------------------------
> 200 OK
> --------------------------------------------

Status:200 OK
Code:200
Date:Sat, 08 Jul 2017 16:10:12 GMT
Server:Apache/2.4.18 (Ubuntu)
Last-Modified:Tue, 09 May 2017 01:03:45 GMT
ETag:"1748-54f0ced6b7e40"
Accept-Ranges:bytes
Content-Length:5960
Vary:Accept-Encoding
Connection:close
Content-Type:text/html


On Sat, Jul 8, 2017 at 9:44 AM, Mitchell Krog Photography <mitchellkrog@xxxxxxxxx> wrote:
It’s one of the best and doesn’t cache anything so any updates you make when working with redirects are picked up instantly.

Kind Regards
Mitchell


From: Nick Kew <niq@xxxxxxxxxx>
Reply: users@xxxxxxxxxxxxxxxx <users@xxxxxxxxxxxxxxxx>
Date: 08 July 2017 at 4:43:01 PM
To: users@xxxxxxxxxxxxxxxx <users@xxxxxxxxxxxxxxxx>
Subject:  Re: Problem with Redirect

On Sat, 2017-07-08 at 08:35 -0500, Blake McBride wrote:
> When, through my browser, I go to abc.com,

Probably what Eric said. But is there history to this?
As in, trying different variants on your configuration?

If you have previously had a permanent (301) redirect
from abc.com, then what you see is likely to be your
browser (rightly) remembering it.

Solution: use a lower-level tool than a general-purpose
browser when testing any aspect of your server setup.
A commandline browser like lynx, or a tool like curl.

(There are also web developer toolkits for Big Browsers.
They would also do the job, but give you more scope for
getting confused and messing it up).

--



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





--
Daniel Ferradal
IT Specialist

email         dferradal at gmail.com

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux