I published my first website! Everything looks great, however when you go to the website address, it doesn't start at the homepage.html, it starts at the contact page (index.php)? Can anyone help me with this? I wonder if it's starting there because it's my only PHP file? I know this has to do with my file paths but I am unsure how to fix it. Please help.
www.eddiearkmunoz.com
When no specific page is specified, the default page is used. Typically for a php web server, it is index.html, index.php or index.htm.
One fix is to rename the homepage.html to index.html and rename index.php to contact.php
A more complicated fix would be to reconfigure the websrever though in this case, it doesn't seem warranted.
Rename homepage.html to index.html
Alternatively, look at this question to configure custom index page in Apache:
How do I change the default index page in Apache?
You named your contact page "index.php", and "index.php" (or "index.html") is always the page that is loaded when you only use the directory URL as the adress. Just rename your pages: make the home page "index.php" and rename the contact page to something else like "contact.php".
Related
Sorry if this isn't the appropriate place to ask this question, as it doesn't pertain directly to code, but I haven't found any help anywhere else.
So I've created a temporary landing page for my website that's just an .html file. I've uploaded it onto the host's public_html directory. In order to access that page I need to go to example.com/test.html. However, I'd like to be able to access that page by just going to example.com.
You can do this by adding this content to .htaccess file in public_html directory
RewriteEngine On
DirectoryIndex test.html
replace test.html with your file name
it's entry page, for whole entry pages, you should use naming index.html, rename your page to index.html
My Wordpress website, www.the-family-historian.net, goes directly to /index.html, which doesn't exist. I have it set in the Wordpress backend so that the landing page is the posts (blog) and not a static page, but this "index.html" seems to be blocking it. Thanks for any help!
Try setting the following at the top of the .htaccess file:
DirectoryIndex index.php
This should force any request to go to index.php first and ignore index.html, not a 301 redirect though.
Using an FTP program, or possibly a web based file manager, view the files that make up your website. Find an option to view "system / hidden files" in order to view the .htaccess file. I suspect you will find a rewrite rule in it pointing to index.html Simply change that to index.php and all should be good.
I am new to coding and I have just signed up to ipage hosting. I have uploaded my .html files to a root directory named "Website". I have several pages that need to be linked to the index.html home page. I have written the following code for each file: Blank but this does not seem to be working. I have also tried
<li>Blank</li>
which also does not work. When I click on a link from the index.html page this message appears.
Page Not Found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please try the following:
If you typed the page address in the Address bar, make sure that it is spelled correctly.
Click the Back button in your browser to try another link.
Use a search engine like Google to look for information on the Internet.
I have tried everything!! Please help!!
In some cases not only directory name is case sensitive, but might be that Website directory is your website's root directory. Therefore I would put these links to index.html and test which works:
<li>Blank</li>
<li>Blank</li>
<li>Blank</li>
It sounds like your files are all in the same folder. In that case you can just do the following:
<li>Blank</li>
Since it is in the same directory /Website/ is not needed and will break your code.
You might want to consider removing the 1st slash..
Try making your link
Blank
Also remember that directory names and files names are case sensitive
So, I currently have a WP blog installed. What I want to do is put a static HTML landing page at the root of the site and then a link to the blog. The HTML landing page does not look similar in theme and everything is hosted under the same domain.
How can I do this with this current structure?
I suppose I would have to somehow move the blog to /blog instead of the root?
Thanks.
Depending on what server you're running, you might not need to do anything. Certain servers, like Apache, have a DirectoryIndex which gives priority to .html files by default. So even if you had index.html and index.php in the same folder, it would load the index.html file.
You could also define the priority in an htaccess file or use the commenter above's suggestion of pasting the HTML into the index.php template and then making a "home" template and telling Wordpress to use that specific page as the homepage.
That being said, I would strongly recommend installing Wordpress in a sub-directory, such as "/blog" as you mentioned. Just as a fail-safe.
I just started developing web page, hosted by iPage.
I wanted to publish my own index.html instead of what was given.
But, when I actually enter the page, it directs to the previously changed page, which does not exist anymore.
I can access index.html, but only when I manually type in the address as epseattle.com/index.html.
How do I fix this?
I have tried fix on htaccess already.
Thanks in advance.
Please try this. Rename the original index.html which was available earlier in your web root to something like this index_1.html. And then try http://www.epseattle.com.
If the above not works, kindly post with your .htaccess file content.
In your .Htaccess file, try this:
DirectoryIndex index.html
Try switching off buffering on the iPage server (you can do this via their site). You will also need to do the same on the browser. Your changes should then be immediately visible. Remember, this is for development only and severely restricts performance of your server.