I have an “under construction” index.html page in FWP that I want up while I work on a site (Magento). I uploaded the index.html page but the website defaults to the index.php pages. What can I do?
In your Apache configuration file, there is a command called DirectoryIndex. It’s a space-separated list of filenames that will match a no-page request (a request for a folder, rather than a specific file). The first match wins, so if your directive looks like this:
DirectoryIndex index.php index.html
Change yours to look like this:
DirectoryIndex index.html index.php
And then it should work the way you want. If you don’t have access to the httpd.conf file in your hosting setup, you may be able to do this by adding an .htaccess file with this line in it. If neither of these are possible, ask your hosting provider to make that change for you.
Even simpler than all this, though, would be to rename your index.php to something else, like index2.php.
Where is this config file located? Is this the same thing as Apache Handlers? I attempted to add directory-index and add the two listed in order but it doesnt appear to work.
The config file is usually located at /etc/httpd/httpd.conf, or /etc/apache2/httpd.conf
You may not have access to this file, unless you are using a Virtual Private Server (VPS) or a server where you have root permissions. Some shared hosts have a way to allow you to configure Apache using a FastCGI file. Your host will be better able to tell you how to accomplish this than I could.
Checked the support files with the host and it stated to update the htaccess file to load alternate index file. Now, when I am ready, I can change it back to the php. Thanks a million Walter!!
Well, it works fine, but now I have to figure out how to make the Magento site work in the background (“offline” and not viewable to public). It doesnt appear to want to load as it defaults to the index.html. I have some research to do on this one.
I’ve never used Magento before, and I’m not sure how or why that could be happening. Is it possible that there was already an .htaccess file in that directory, and you blew it away when you added your DirectoryIndex directive? If you edited an .htaccess file that was already there, it’s possible you might have disturbed the order of its operations, too.
When you are using Magento normally, do you even see the index.php part of the URL? Do the URLs have index.php?foo=bar&baz=blah in them? Or does it use a “clean” URL, where each segment means something different, like /catalog/category/product/feature or something like that?
If that’s the case, you probably won’t be able to run this at all unless you put it in a different directory on your server altogether.
I deleted the index.html to see what happens. When I enter the website it reverts to the servername123/~username/index.php/ and the .htaccess file has this “DirectoryIndex index.php”. Before I had modified it to html and the FWP file loaded fine.
The detail pages with product show /index.php/product_detail_info.html
If I cannot get the first html “under construction” index.html I can live with that.
Based on a support article, I configured Magento database “core_config_data” to point to the main domain name instead of the hostserver123/~username/ and it doesnt seem to have effect.
Yes, but it would overwrite the magento’s index and I suspect cause problems. It appears everything is not working now. I tried to add a page from the magento admin area to see if that would suffice for a new home page. I deleted it and left the other home page in tact. Now the formatting is gone and I cannot access the admin again. I have submitted a support ticket.
Currently I have the index.html up so there isnt any confusion. I dont know what’s going to happen wiht the magento installation.