简体   繁体   中英

What file is my site's home page?

I am editing a website that I did not create. It is built entirely with HTML. I edited the index.html file thinking that would effect the home page of the website, but the website does not go to index.html when it lands on the home url. Is there a way to tell what file it is using or at least redirect the website to the home url/index.html?

I have tried a 301 Redirect but it doesn't seem to be working. It is hosted using WHM and CPanel. Visit asburyoceanbeachinn.com and then visit asburyoceanbeachinn.com/index.html. They are different (see the menu bar).

This is my htaccess file:

RewriteEngine on

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName asburyoceanbeachinn.com
AuthUserFile /home/aobi/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/aobi/public_html/_vti_pvt/service.grp

RewriteCond %{HTTP_HOST} ^asburyoceanbeachinn\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.asburyoceanbeachinn\.com$
RewriteRule ^/?$ "http\:\/\/asburyoceanbeachinn\.com\/index\.html" [R=301,L]

From your .htaccess file, it looks like the index.html file in the root directory is being used when you go to asburyoceanbeachinn.com:

RewriteCond %{HTTP_HOST} ^asburyoceanbeachinn\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.asburyoceanbeachinn\.com$
RewriteRule ^/?$ "http\:\/\/asburyoceanbeachinn\.com\/index\.html" [R=301,L]

From your comment, it looks like the reason you didn't see a change in index.html initially is because the file was cached. When you visited asburyoceanbeachinn.com/index.html, you saw the change because you were not hitting the cached file (because the path was different). This made it look like two different files were being served, but it was really just one file and a cached version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM