I just uploaded files to my website with FileZilla. When I type websitename.com nothing shows up, but when I type in websitename.com/filename.html then my website appears how I want it to. But how do I make my website appear when I just type websitename.com?
Do you have an empty file called index.html (or any file named index) in your site root (the folder that www.site.com contains its first level of files)? If so, that's your problem.
If no index file exists, rename the file that is your homepage to index.html.
Related
I have a WordPress site, let’s say it’s on http://awesome.site. On this site I’ve created a page with url awesome.site/page.
Now I wish to include a physical file named “file.txt” so it’s url would be awesome.site/page/file.txt. How to do that?
Of course, if I create a folder /page and place a file.txt inside it – WordPress wouldn’t show the content at all. My physical file.txt is currently located inside /stuff directory – current full path is: awesome.site/stuff/file.txt
I have a file hosted at http://example.com/old-directory/document.pdf.
I'm not able to change the link, but I need to change the directory the file is downloaded from.
Current dir
/my/web/server/current/files/document.pdf
New dir
/my/web/server/new/files/document.pdf
What's the best method of changing the directory without changing the URL with PHP/Apache?
You can use a .htaccess to remap that location to a different directory (or just that file).
Create a .htaccess file and use this syntax to "redirect" the file:
Redirect /olddirectory/oldfile.html /newdirectory/newfile.html
This will send the new file instead of the old one when accessed.
If you need to do something more specific, this generator will work fine.
I want to block the direct access to directories in the www folder of my wamp server so that no one can directly access the files which are residing there.
Example:
There is a folder in www named "folder". This folder contains a file "page.php" and several images and css files. There is no index file in this folder. Now when the user enters ..../folder/ whole directory will be accessible to user. But I want to hide the directory list from user. But page.php should be accessible when opened through the any other page (via hyperlink)
Please help!
The way you describe it, you probably still want those items to be accessible so that pages referencing those files will still load. You just don't want Apache to list out the files when navigating to that folder.
Apache calls these pages "directory indexes". You can turn it off for a specific folder (and sub folders) by adding to the .htaccess file for that folder an entry:
Options -indexes
More details on the Options directive and .htaccess files here:
https://httpd.apache.org/docs/current/mod/core.html#options
I installed Drupal on my website. It works perfectly but to reach the front page I'm systematically redirected to a page called "Index of" and I have to click on the subfolder drupal-7.12/ to reach the front page. So, the real url for my website i guess is
http://www.mysite.com/drupal-7.12
On my ftp server is organized like this:
Folder public_html
-> Folder drupal-7.12 + a file .htaccess
There is another .htaccess file inside the folder drupal-7.12
I know that I have to modify one of them but i don't know which one and what i have to modify ?
I hope that someone will understand my problem and could help me
Thanks
ML
I would suggest that you remove the folder in drupa.7.12 and move everything up one directory. Basically you are set up as:
Mysite/drupal7.12
move all the contents of drupal 7.12 up one directory to your public_html folder
Or you need to edit the htaccess in the public_html folder to redirect you to that folder. But that is going to cause some issues in the long run.
Today I moved my website to a new hosting company (Verio). I've done this lots of times before, and I know that your website should go inside the "htdocs" folder.
Now usually when I use FileZilla, I can do a "Right Click" on a filename to get the URL of that file. This is the result of my root default file: ftp://test#test.com/www/htdocs/Research/index.php
However, on the web, the true URL of my default file is: www.test.com/Research/index.php
My index.php file is in the website root folder. Does anyone know why FileZilla would include the server folders "www/htdocs" as part of the URL? These folders should not normally be visible to the user.
OR, is this look correct?
That ftp url is correct. Your FTP account has access to the two folders (www/htdocs/) before the document root, as most hosting providers provide.
You are also correct to assume that http access is limited to the document root. (Meaning they cannot see www/htdocs/)