Do you want your permalinks to have .html
, something like http://example.com/this-is-my-best-post.html
?
Why do you want to redirect to index.html? Would not making a static page as home page do the same thing? Go to WP control panel, Settings > Reading and set Front page displays ‘A static page’ (radio button) then select which of your WP pages is to be the front page.
Also index.html has priority over index.php so if someone types in your domain name eg http://www.mydomain.com he will see index.html even if both files, index.html & index.php are there and WordPress will not get loaded.
Was that what you were looking for?
That is what I want to do pete. Have a static page (with just a screenshot of the future site on it) display instead of the wp pages i’m building. I have an index.html and index.php in the root folder, however without the redirection from htaccess, it seems that the index.php (wordpress) is taking priority. With the redirection, when I try to preview a page created in wordpress, it automatically redirects to the index.html page and I can’t view any changes I’ve made to the page in wordpress. I apologize for not being more clear.
That is interesting! Index.php taking priority over index.html.
You can try putting this in your .htaccess file
DirectoryIndex index.html index.php
Order of priority is left to right. That should change your server to take index.html as priority index file but if you need to access WordPress then go for index.php. I hope this works as I have never experienced this before. Better still check with your server tech support why index.php has priority over index.html .
Thanks for the help pete. I thought it was very strange that .html wasn’t taking priority, but it seems like thats what’s going on. Since most of what I need to do is styling, I’ve just been “breaking” htaccess to update the page, reinstalling it to take the static page back, and styling with firebug on the “updated” on the backend. Not to most elegant solution but unfortunately I need to get this done rather than get down into the nitty-gritty and figure out whats really going on =/. Ces’t La Vi.
Thanks again for the help.
Anyone who’s searching for a solution to this problem (as originally posted), the answer is here: !!
wordpress.org/support/topic/how-can-i-turn-off-wordpress-indexphp-redirect-to-domain-root
My server defaults to index.php, so I also had to put a line of code at the top of the .htaccess file:
#default index page
DirectoryIndex index.html index.php //index is default
Much better that trying to use wordpress static pages, for which you have to mess with your themes / page templates to get it to display without all the header and footers etc.