[Pro] Temporarily override viewing index.php with index.html

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?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

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.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

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.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

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.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

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!!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

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.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Just enter a complete URL:

http://example.com/index.php

The automatic index will never override an explicit request for a file, only fill in when you don’t specify a complete URL.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Oddly, it reverts back to the host server name/~username when I attempt to use the php file.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

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.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

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.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

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.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Could you not just change your under construction page to index.php

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

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.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

OH man, this is a royal pain… now it is working as expected. Geez. And I just submitted the support ticket.

The .htacces has the IndexDirectory as index.html index.php

The php database has the core_config_data set to the actual domain name.

I can now type in the index.php after the domain and get teh magento installation.

Ahh… what or how this all tweaked funny… who knows… but it is responding as I thought it would with your help.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That’s great, glad we could help.

Walter

On Apr 10, 2010, at 3:37 PM, Beatrice wrote:

OH man, this is a royal pain… now it is working as expected. Geez.
And I just submitted the support ticket.

The .htacces has the IndexDirectory as index.html index.php

The php database has the core_config_data set to the actual domain
name.

I can now type in the index.php after the domain and get teh magento
installation.

Ahh… what or how this all tweaked funny… who knows… but it is
responding as I thought it would with your help.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options