This link
http://localhost/
works fine.
This link doesn't work
http://localhost/shlingy/
directory location
C:\wamp\www\shlingy\index.html
Does anybody know why this link does not work?
Check whether there is a .htaccess file in www or www/shlingy directory or not. If there is, rename or remove it. Probably a rewrite rule in that file is causing the problem.
Also, make a index.html file in the www/shlingy directory which will be displayed when you access the shlingy.
It was a mistake on my end that i call a constructor of PHP file at the start page but that file contain an error. Its annoying that server just show blank page instead of error Massagining
Related
I am linking my navigation bar list items to includes folder page with href Attribute
<li>Brands</li>
I have tried copying full path
I have tried setting permission on htdocs to 777 but still not working.
My code and folder structure
I am using new Ubuntu machine (16.04) with XAmp
This is my error :
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
You are putting wrong path
This is your site url
http://localhost/FoundationFlex/
and this is your file path
Brand
replace your code with this <li>Brands</li> or <li>Brands</li>
the problem in your href link is that you are giving a file path in browser, which correct but not executable nor a website url so it will always throw a 404 error which means the web page doesn't exits.
You are trying to link using PATH on server, use URL instead and make sure this file is accessible from browser
<li>Brands</li>
You are using the full file system path of the file. But you must enter a relative path to your webservers root folder (htdocs).
So if you call your page with http://localhost/ then in your case your webserver root folder seems to be /opt/lampp/htdocs/. Linking the file brands.php in a html link will look like this (relative):
Brands
or absolute
Brands
or (but this one should have the same result ase the one above:
Brands
These links can help you:
https://www.coffeecup.com/help/articles/absolute-vs-relative-pathslinks/
https://www.w3schools.com/html/html_links.asp
If /opt/lampp/htdocs/FoundationFlex is your servers DocumentRoot you can just
Brand
I'm a novice in PHP and recently changed the home page of my website from index.html to index.php. When I changed the file to PHP, it would display a white blank page. Changing the file back to HTML would restore the page back to normal.
Anybody know why the page goes blank when the extension is changed to PHP, and how I can fix it?
Some ideas:
If there's some PHP in the file there might be errors in it, see if you can check your webserver error log
There might be a .htaccess file that's hard coded to redirect to the html filename, see if you have a .htaccess file in that directory.
The webserver might be configured to not read php files, see if you can check your webserver error log
I created a subdomain in plesk and tried to upload an index.html with some text on it, It renders well.
However, when I tries to upload an index.php with a basic text on it, it shows
Forbidden
You do not have permission to access this document.
The same error that shows when my subdomain folder is empty. At the same time it downloads a file which contains my index.php code.
Anyone have some idea about this? thank you in advance
I'm using Xampp no problem. I normally type localhost/assignment2 and the list of php pages I created come up but I just created an index.php page and now when I type localhost/assignment2 the index page is showing instead of my list a programs I made.
Is there a way I can rectify this or do I need to do something specific to it.
You server will always search for index.php, index.html and index.htm in your folder and show it if it exists. If none of these files exists the server shows a list of all files or an error, depending on your configuration.
This is happening because there is conflict between the name of xamp's index.php and the index.php that you have created.The same problem will arise if you create home.php. By default xamp gives preference to the index.php file and instead of showing the index of files it ends up displaying index.php. So the solution is to change your index.php filename to index1.php .
On localhost, in one of my folders, files are accessible like http://localhost/folder/map instead of http://localhost/folder/map.php. It's probably because of something wrong with Apache's configuration but I'm stuck here and nothing comes to my mind.
If you have a file called index.php or index.html in your http://localhost/folder/map folder, Apache will run that file when you just enter the directory name as a browser url.
This is what makes http://localhost run a page rather than just showing you a directory listing, or show a blank page.
This is probably the reason that you see a valid page when just keying in the http://localhost/folder/map url.