Mysterious redirection(?)

CEHJ
CEHJ used Ask the Experts™
on
There seems to be some sort of mysterious redirection going on when i try to access the site at
http://fostamells.technojeeves.com/

A static file, such as http://fostamells.technojeeves.com/license.txt comes out fine but the attempt to access the homepage seems to land on a page of the company that hosts technojeeves.com. 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
wp.log
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018

Commented:
I *think* that it is WP doing this. Take a look at the Home and Site URL information perhaps?
Top Expert 2016

Author

Commented:
Thanks but that appears to be in order. Both are http://fostamells.technojeeves.com
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 Engineer
Distinguished Expert 2018

Commented:
AFAICT no redirection... only when requesting index.php

 $ curl -v http://fostamells.technojeeves.com/
*   Trying 109.157.223.23:80...
* TCP_NODELAY set
* Connected to fostamells.technojeeves.com (109.157.223.23) port 80 (#0)
> GET / HTTP/1.1
> Host: fostamells.technojeeves.com
> 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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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="http://www.falcoda.co.uk/css/hpreset.css" type="text/css" />
<!-- Link to the style CSS sheet -->
<link rel="stylesheet" href="http://www.falcoda.co.uk/css/hpstyle.css" type="text/css" />

        <!-- Unit PNG Fix -->
    <!--[if lt IE 7]>
        <script type="text/javascript" src="http://www.falcoda.co.uk/css/hpunitpngfix.js"></script>
        <![endif]-->
</head>

<body>

<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 -->
</div>
        <!-- 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 -->
</body>
* Connection #0 to host fostamells.technojeeves.com left intact
</html>

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 http://fostamells.technojeeves.com/index.php
*   Trying 109.157.223.23:80...
* TCP_NODELAY set
* Connected to fostamells.technojeeves.com (109.157.223.23) port 80 (#0)
> GET /index.php HTTP/1.1
> Host: fostamells.technojeeves.com
> 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: http://fostamells.technojeeves.com/
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
<
* Connection #0 to host fostamells.technojeeves.com left intact

Open in new window


Is htaccess setup correctly?
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Top Expert 2016

Author

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

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

SetEnv DEFAULT_PHP_VERSION 53

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]
</IfModule>

# END WordPress

Open in new window

Top Expert 2016

Author

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 FavorFractional CTO
Distinguished Expert 2018

Commented:
I'm seeing what noci sees...

imac> curl -I -L http://fostamells.technojeeves.com/
HTTP/1.1 200 OK
Date: Tue, 11 Jun 2019 14:16:38 GMT
Server: Apache/2.4.25 (Debian)
Link: <http://fostamells.technojeeves.com/wp-json/>; rel="https://api.w.org/"
Link: <http://fostamells.technojeeves.com/>; 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 FavorFractional CTO
Distinguished Expert 2018

Commented:
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.
Top Expert 2016

Author

Commented:
Well it definitely started working when i deleted index.html
Fractional CTO
Distinguished Expert 2018
Commented:
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.
Top Expert 2016

Author

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
Top Expert 2016

Author

Commented:
Thanks folks
Top Expert 2016

Author

Commented:
AllowOverride All 

Open in new window

needed setting in my vhost config. Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial