Mysterious redirection(?)

There seems to be some sort of mysterious redirection going on when i try to access the site at

A static file, such as comes out fine but the attempt to access the homepage seems to land on a page of the company that hosts I really can't see why. Is it Wordpress doing this or what (after all it does say X-Redirect-By: WordPress)? I've attached a wget debug log of the attempt to get the homepage
LVL 87
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I *think* that it is WP doing this. Take a look at the Home and Site URL information perhaps?
CEHJAuthor Commented:
Thanks but that appears to be in order. Both are
fwiw i can get in to wp-admin and the content appears. When i try to view it from there though, i get a 404
Also, fwiw it would appear that mysql is not being queried at all when a page is requested
nociSoftware EngineerCommented:
AFAICT no redirection... only when requesting index.php

 $ curl -v
*   Trying
* Connected to ( port 80 (#0)
> GET / HTTP/1.1
> Host:
> User-Agent: curl/7.65.0
> Accept: */*
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Tue, 11 Jun 2019 13:11:19 GMT
< Server: Apache/2.4.25 (Debian)
< Last-Modified: Tue, 17 Nov 2015 09:10:32 GMT
< ETag: "8d6-524b8e5d3d200"
< Accept-Ranges: bytes
< Content-Length: 2262
< Vary: Accept-Encoding
< Content-Type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>New Hosting Account is now Active</title>
<!-- Link to the reset CSS sheet -->
<link rel="stylesheet" href="" type="text/css" />
<!-- Link to the style CSS sheet -->
<link rel="stylesheet" href="" type="text/css" />

        <!-- Unit PNG Fix -->
    <!--[if lt IE 7]>
        <script type="text/javascript" src=""></script>


<div id="container"><!-- Start Container DIV -->
        <div id="header"><!-- Start Header DIV -->

    <div id="tagline"><!-- Start Tagline DIV -->
    <!-- Your Tagline Goes Here -->
    <h1>Your New Hosting Account is now Active</h1>
    </div><!-- End Tagline DIV -->

    <!-- Start Main Content -->
    <div id="main"><!-- Start Main DIV -->
        <div id="column_left"><!-- Start Left Column DIV -->
                <!-- Your Subheader Goes Here -->
                <h2>Web Hosting Instructions</h2>

                <!-- Your Paragraph Of Text Goes Here -->
                <p>This is your index.html page
Please replace this when you upload your website
If you are experiencing difficults with your account
or require any another related technical support.
<br /><br />
Please contact Customer Support: +44 (0)208 1236532</p><!-- End Paragraph Of Text -->

        </div><!-- End Left Column DIV -->

        <div class="separator"></div> <!-- This is the separator between the two columns -->

        <div id="column_right"><!-- Start Right Column DIV -->
          <!-- End Contact Form -->
        <!-- End Right Column DIV -->

        <br class="clear" />
    </div><!-- End Main DIV -->
    <!-- End Main Content -->

    <div id="footer"><!-- Start Footer DIV -->
    <div id="copyright_notice"><span>▒ 2015 copyright</span> Hosting Console. All rights reserved.</div><!-- Copyright Notice -->
    </div><!-- End Footer DIV -->
</div><!-- End Container DIV -->
* Connection #0 to host left intact

Open in new window

Might be you need to contact your hoster to help setup the service correctly.
(it still needs some configuration).

requesting index.php gets a 301 to the bare:
 $ curl -v
*   Trying
* Connected to ( port 80 (#0)
> GET /index.php HTTP/1.1
> Host:
> User-Agent: curl/7.65.0
> Accept: */*
* Mark bundle as not supporting multiuse
< HTTP/1.1 301 Moved Permanently
< Date: Tue, 11 Jun 2019 13:12:40 GMT
< Server: Apache/2.4.25 (Debian)
< X-Redirect-By: WordPress
< Location:
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
* Connection #0 to host left intact

Open in new window

Is htaccess setup correctly?
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

CEHJAuthor Commented:
Might be you need to contact your hoster to help setup the service correctly.
That WP instance is being hosted by me. OTH not so

Is htaccess setup correctly?
Here is the contents:
# Switch rewrite engine off in case this was installed under HostPay.
RewriteEngine Off


DirectoryIndex index.cgi index.php

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Open in new window

CEHJAuthor Commented:
Definite progress. I was advised to remove index.html (i should have remembered to not have that) and now it's working. I can get pages by id but not by post name now.
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
I'm seeing what noci sees...

imac> curl -I -L
HTTP/1.1 200 OK
Date: Tue, 11 Jun 2019 14:16:38 GMT
Server: Apache/2.4.25 (Debian)
Link: <>; rel=""
Link: <>; rel=shortlink
Content-Type: text/html; charset=UTF-8

Open in new window

So no redirection at the Apache level.

Visiting site in Chrome produces no redirection either, so no Javascript redirection.

Maybe you've already fixed the problem.
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Having index.html (with your .htaccess file) will have no effect, as index.html files will never be accessed, as this file is missing from your DirectoryIndex directive.
CEHJAuthor Commented:
Well it definitely started working when i deleted index.html
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Aside: Deleting index.html - suggests that your .htaccess file is being over ridden by some other config.

Best figure out the location of this over ride, as this type of broken config processing can drain hours of time.

As Lao Tzu said, "Best do what's difficult, when it's easy."

In other words, fix this now, rather than wait till site performance or functionality circles the drain.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CEHJAuthor Commented:
suggests that your .htaccess file is being over ridden by some other config.
Perhaps. It might be what is referred to by Apache people as "Debian bork" :) I'll check that out
CEHJAuthor Commented:
Thanks folks
CEHJAuthor Commented:
AllowOverride All 

Open in new window

needed setting in my vhost config. Thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking Protocols

From novice to tech pro — start learning today.