A landing page without having the index.html ext. showing
#1
Posted 29 January 2012 - 09:42 PM
Just a quick question, when I upload, the server will automatically redirect any visitor to the index.html file.
But I've seen on bigger sites that the first page is just the domain name without the index.html extension showing up.
How do I do that?
Thanks.
#2
Posted 29 January 2012 - 10:01 PM
rename it to index.html
#3
Posted 29 January 2012 - 10:35 PM
So the landing page is: www.example.co.uk/index.html
What I want is the landing page to be: www.example.co.uk
#4
Posted 29 January 2012 - 10:47 PM
#5
Posted 29 January 2012 - 10:56 PM
My home site is:
jejune-jejune.co.uk
enter that add in, it will just go straight to jejune-jejune.co.uk/index.html
#8
Posted 31 January 2012 - 09:06 AM
The reason for this is simply you have a 301 redirect instigated on your domain. I did a quick check and it returns this:
Checked link: http://www.jejune-jejune.co.uk
Type of redirect: 301 Moved Permanently
Redirected to: http://www.jejune-je....uk/index.html/
301 Redirects are headers sent to the browser for instructional purposes. Basically if anyone accesses the root domain, http://www.jejune-jejune.co.uk, they are being redirected to the index.html/ page automatically.
Depending on your hosting environment this is probably applied in your .htaccess file. If you cannot see this try looking for a setting in your FTP client for "Show hidden files" or similar, as some clients hide it for security or to prevent accidental editing.
If you're still stuck, contact your host. This is not usually something that can be setup by accident as it's been specified somewhere, but as I say, it depends on your hosting environment.
Hope this helps.
#10
Posted 31 January 2012 - 04:21 PM
No worries at all. As I say it depends how this 301 has been put in place, whether it's in a .htaccess or via an option in your control panel so have a look around.
If you get stuck just reply here and I'll help if I can.
Cheers.
#11
Posted 01 February 2012 - 05:23 AM
RewriteCond %{REQUEST_URI} /index\.html?$ [NC]
RewriteRule ^(.*)index\.html?$ "/$1" [NC,R=301,NE,L]u can try this code too in ur .htaccess file
how to find .htsccess file on ur server
This post has been edited by sash_oo7: 01 February 2012 - 05:53 AM
#12
Posted 01 February 2012 - 06:52 AM
sash_oo7, on 01 February 2012 - 05:23 AM, said:
RewriteCond %{REQUEST_URI} /index\.html?$ [NC]
RewriteRule ^(.*)index\.html?$ "/$1" [NC,R=301,NE,L]u can try this code too in ur .htaccess file
how to find .htsccess file on ur server
He already has a 301 redirect in place which is causing his issue. If, as assumed, his issue is that he just wants the root URL to display upon page load, i.e. http://www.yourdomain.com instead of http://www.yourdomain.com/index.html he won't need any redirects in his .htaccess as this is normal behaviour.
You're also assuming his hosting/server has mod_rewrite enabled, which some don't, in which case your above code won't work. It's also good practise to initialise the RewriteEngine before writing rules, again assuming mod_rewrite is enabled.
Hope this helps, let us know how you get on!
#13
Posted 08 February 2012 - 06:14 PM
What I did wrong was zip the folder containing the web files then upload it to the public folder. The mistake I made was to rename the folder containing the web files to index.html, instead of just moving them outside of the zip folder.
Thanks for the help, it's much appreciated.
Help

















