I have developed a HTML5 website and was working perfectly fine in my localhost. But when i try to host the same pages in 000webhost.com all the CSS , Images , JS files are not loading, which are working good in my xampp localhost.
Folder Structure from hosting provider
//index.php code - this is by default available in the .htaccess folder, do i need to modify something here?
<?php
// Powered by Zyro
include dirname(__FILE__).'/vXXXXX,com/index.html';
?>
Error Logs from Console when loading the index.html page fro hosted server.
This is the first time i am hosting with this hosting provider, and facing the same issue of not loading the CSS with other projects also.
Did i miss something ?
In the folder structure , there is an index.php given by the hosting provider by default. Deleting the index.php file and moving my html files out of the folder and placing along with htaccess files has worked.
Related
I am trying to install Wordpress using this tutorial https://cloud.google.com/community/tutorials/run-wordpress-on-appengine-standard.
I have it deployed, but when I try to have it as "subfolder" /blog service of the main domain using dispatch.yaml, the site seems to load (e. g. file /blog/2021/05/27/hello-world/), but the css and js files throw 404 error.
E.g. /blog/wp-includes/css/dist/block-library/style.min.css?ver=5.7.2.
I have also changed siteurl in the database, but that does not seem to work.
Check your static file handler in app.yaml. Since you are putting your site under a folder (sub folder), calls to your static files start from /blog/. This means the handlers for your static file should also start with /blog/
I installed WP locally on XAMPP.
When I manually type my project root in a browser I start seeing this. But when I run the project through VScode Live server I start seeing all files and directories of my site see here.
Why does this happen? Is it because I run the project locally? Or is it because the root is followed by :5050 port number?
My theme style.css is empty.
My theme index.php contains only starting html !+tab attributes (see here)
The first image looks like to be served by apache which loads mod_php which "executes" the php code of every .php file and serve the result as html.
The second image looks like an application running on port 5000 (which might not be apache) and NOT using a module to "execute" .php file so it just shows the content of the folder.
Firebase web hosting
I have uploaded to the public folder 3 items:
index.html
js folder
css folder
I notice that I can browse to the folders and actually see the js file or css under these folders. I want to prevent it.
I tried to put .htaccess but it does not seem to have any effect at all.
I need your assistance how should I prevent directory browsing?
I recently switched my web hosting to CentOS7 dedicated server. I uploaded JS, CSS, HTML files and they worked just fine but when I uploaded a latest version of .html and .css, the html file did update but for some reason .css remained the same. To make sure I visit domain.com/css/style.css and search for the new styles but they were not there. Also I've cache enabled and I did clear my browser cache and restart httpd/apache in my CentOS server.
Turns out it was mod_pagespeed saving site's cache. Delete them from /var/cache/mod_pagespeed/rname/* and /var/cache/mod_pagespeed/v3/*
I have an static html file with some links to: http://example2.com/url
The html file is hosted in other site: http://example.com/app/index.html
If I access the file locally, e.i. in the IIS server. All the links point to the correct Urls (http://example2.com/url). However if I access the site from another machine all the URL links in file index.html are replaced with: http://example.com/url
I am sure this error is related to some configuration mistake but currently I am completely lost.
Any help be will really appreciated