Resolved Website won't load, times out

Status
Not open for further replies.

moarinfo

New Member
Messages
4
Reaction score
0
Points
1
Hi, I looked through the forum to see if I could find any info relevant to my situation, but it seems to be unique. For the past couple weeks when I try to access my website (moarinfosplz.x10host.com) it won't load and eventually gives a timed out error ("server took too long to respond"). I can log into cpanel and see all my files are still there, so it doesn't seem to be a migration issue, but it must be something else. Others have the same issue so it isn't a problem with my browser or IP address or anything.
Thanks!
 

lylex10h

Active Member
Messages
982
Reaction score
71
Points
28
moarinfosplz.x10host.com resolves to 198.91.81.6 which has a PTR record of xo5.x10hosting.com (and resolves back to 198.91.81.6). When you access DirectAdmin (cPanel), does it show xo5.x10hosting.com:2222 in the address bar or a different URL?
 

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
@lylex10h is correct. Your account didn't transfer DNS correctly. I'm asking an admin to look into this.
 

Anna

I am just me
Staff member
Messages
11,733
Reaction score
578
Points
113
DNS should now be updated.

You might need to flush dns cache or await its natural refresh before the site loads properly.
 

moarinfo

New Member
Messages
4
Reaction score
0
Points
1
Thanks, it is kind of working but now every page tries to download as a file instead of displaying in the browser. Tried Firefox and Chrome with same result.
 

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
What does your .htaccess file look like? There's something wrong with the headers coming from your page, but I don't know why this would be only for you.

Code:
> GET /index.html HTTP/1.1
> Host: moarinfosplz.x10host.com
> User-Agent: curl/7.64.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Connection: Keep-Alive
< Content-Type: application/x-httpd-lsphp
< Last-Modified: Wed, 17 Jul 2019 16:53:16 GMT
< Etag: "2c3f-5d2f527c-e13ac71302310676;;;"
< Accept-Ranges: bytes
< Content-Length: 11327
< Date: Sat, 23 May 2020 18:27:26 GMT
< Server: LiteSpeed
< Vary: User-Agent
< Cache-Control: max-age=0, private, no-cache, no-store, must-revalidate
<
{ [10136 bytes data]

GET index.html
Content-Type: application/x-httpd-lsphp

So I'm requesting index.html but it's replying with a file that is x-httpd-lsphp (Lightspeed PHP?). It should reply with text/html, otherwise my browser will refuse to read it.
 

moarinfo

New Member
Messages
4
Reaction score
0
Points
1
Odd, I haven't touched most of the files since well before the migration, and everything had been working fine. Maybe there's a new version of php that functions differently? I had a few lines in the .htaccess file to force Lightspeed to treat html files as php so I could use php without needing the .php extension which worked before. I took it out for now, but is there a way to make it work again?
 

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
Maybe something like this?

Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)[.]html$
RewriteCond %{DOCUMENT_ROOT}/%1.html !-f
RewriteCond %{DOCUMENT_ROOT}/%1.php -f
RewriteRule ^ %1.php [L]

I'm sorry, I don't have time to test it immediately. This actually took way more time than I thought it would as I worked through it. If you need to debug it, add this to the top:

LogLevel alert rewrite:trace3

Your error log in DirectAdmin will show what it's trying to do.

Explanation:

RewriteEngine on start using rewrite*
RewriteCond %{REQUEST_URI} ^(.*)[.]html$ Incoming request is (SOMETHING).html. Save SOMETHING to %1
RewriteCond %{DOCUMENT_ROOT}/%1.html !-f On the server, SOMETHING.html does not exist
RewriteCond %{DOCUMENT_ROOT}/%1.php -f On the server, SOMETHING.php does exist
RewriteRule ^ %1.php [L] Rewrite SOMETHING.html as SOMETHING.php; do not redirect the visitor; do not process any more RewriteRules
 
Last edited:

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
@moarinfo Is your issue resolved? Please let us know if you need any further assistance. This thread will be closed soon for inactivity. Thank you.
 

moarinfo

New Member
Messages
4
Reaction score
0
Points
1
Thanks @garrettroyce, I haven't had a chance to test what you gave me, but my site is working for now without the html/php stuff so I consider it resolved. I'm just not sure why it stopped working in the first place, when the exact same site was working before the migration.
 

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
No problem.

This way is a little more efficient as it won't try to parse an html file if the php file doesn't already exist. So if you ever run a site with a million hits a day, remember that your old pal Garrett hooked you with with the best RewriteRules.
 
Status
Not open for further replies.
Top