Wordpress: index.html vs. index.php
binarysoul
Member Posts: 993
in Off-Topic
Most web hosting companies want you to place index.html in your web directory as default so it brings up your domain.
Given wordpress uses index.php, how can you make a Wordpress blog become the default page of a domain?
Given wordpress uses index.php, how can you make a Wordpress blog become the default page of a domain?
Comments
-
royal Member Posts: 3,352 ■■■■□□□□□□I use hostmonster.com. My wordpress default page is index.php and loads just fine. Also, the reason this works is the Wordpress installation modifies your htaccess file with:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
So basically your web server will load index.php.“For success, attitude is equally as important as ability.” - Harry F. Banks -
darkerosxx Banned Posts: 1,343Web servers have that setting in the configuration as to which types of extensions are allowed to be indexes.
If you don't have any other index files, just leave the index.php there and see if it works.
If you've already done that and it doesn't work, it's likely that your provider doesn't have .php allowed as an index extension type.
If you want to have other index files in the same directory, have your provider only allow .php as an index extension type.
Aside from all of that, you could place a index.html page and include a redirect to index.php. -
tiersten Member Posts: 4,505Most will search for them in turn. index.html is usually first. If it can't find that then it'll pick .php or .asp or whatever based on whatever language the server knows.
-
binarysoul Member Posts: 993I know for a fact the provider only allow index.htm or index.html, so no php. I may go after them to see if they can help.
I like the redirection idea, but I think visitors will may not like that, or is the process transparent to the visitor? -
tiersten Member Posts: 4,505binarysoul wrote:I know for a fact the provider only allow index.htm or index.html, so no php. I may go after them to see if they can help.binarysoul wrote:I like the redirection idea, but I think visitors will may not like that, or is the process transparent to the visitor?
-
dynamik Banned Posts: 12,312 ■■■■■■■■■□Might want to find a new web host. I'm not sure how obvious a meta refresh would be to most people. You could also throw onload="window.location='index.php'" in the <body> tag. (Still include the meta refresh in case JS is disabled.)