How to get shop.php to open as the default

Share tips and tricks with the AOM user community.
Post Reply
LindaBell009
Experience Level 1
Experience Level 1
Posts: 27
Joined: Fri Sep 02, 2005 12:02 pm
Contact:

How to get shop.php to open as the default

Post by LindaBell009 » Mon Sep 05, 2005 10:13 pm

1. See if your website has a tool called Redirect or Redirect URL (or something like it.)

(If it doesn't don't bother reading the rest)

2. Be sure YourDomainName.com/ has a file called Index.htiml.

(If it doesn't, maybe creating one will work)


3. Open the Redirect tool up. It will have something like
From: http://www.YourDomainName.com/_______

In the blank space, type index.html


4. In the "to part" type YourDomainName the exact same way the server had YourDomainName.com. (If it had http://www.YourDomainName.com, be sure to put the www. before YourDomainName.com, too)

5. After YourDomainName.com put /shop.php.


So, the entire "to" line will read:

http://www.YourDomainName.com/shop.php

6. open up another browser window and type YourDomainName.com (you don't need the www. if your domain name was regestered without it, also)

7. The Associate-O-Matic store should open up.

Hope it works for you, too!
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

LindaBell009
Experience Level 1
Experience Level 1
Posts: 27
Joined: Fri Sep 02, 2005 12:02 pm
Contact:

How to Change Shop.php to Index.php

Post by LindaBell009 » Tue Sep 06, 2005 10:58 am

1. Rename the file

2. Oen the file in Notebook or any editor that saves text files.

(The file looks like munge except for the top line.)

3. In the top line you will find the variable $codelock_file="shop.php".

4. Change the "shop.php" to "index.php" and save the file.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

jester
Experience Level 1
Experience Level 1
Posts: 34
Joined: Fri Aug 12, 2005 9:06 am

Post by jester » Tue Sep 06, 2005 11:02 am

If you run your own Apache-based webserver, verify that this option is set in the global httpd.conf:

<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.shtml index.cgi index.php
</IfModule>

That will ensure that index.php is used by default.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

blacknight
Experience Level 2
Experience Level 2
Posts: 71
Joined: Wed May 10, 2006 1:51 pm

Post by blacknight » Wed Jun 14, 2006 6:24 pm

If you've got shell access (or use a reasonably good hosting company) simply create a symlink from shop.php to index.php:

Code: Select all

ln -s shop.php index.php
Problem solved :)

fshagan
Experience Level 3
Experience Level 3
Posts: 119
Joined: Sun May 21, 2006 12:42 pm
Location: CA
Contact:

Post by fshagan » Wed Jun 14, 2006 6:41 pm

Another method is to create a "index.php" file in your main directory ("public_html" on many hosts). In the file, you have just these three lines:

<?
Header("Location:http://www.YOURDOMAIN.com/shop/shop.php");
?>


That assumes you have Associate-0-Matic installed in /shop/ of course!

openmind
Experience Level 1
Experience Level 1
Posts: 10
Joined: Fri Oct 13, 2006 7:27 am
Contact:

Post by openmind » Fri Oct 13, 2006 7:35 am

If you are using IIS and have access, you can simple create a new home directory index file name shop.php in the IIS site.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

aclass
Experience Level 2
Experience Level 2
Posts: 62
Joined: Mon Sep 08, 2008 12:36 pm
Contact:

Re: How to get shop.php to open as the default

Post by aclass » Thu Jun 25, 2009 6:10 am

or just read what I posted here
viewtopic.php?f=8&t=52&start=15

:)

have fun
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

Greendude47
Experience Level 1
Experience Level 1
Posts: 10
Joined: Thu Jan 27, 2011 11:24 pm

Re: How to Change Shop.php to Index.php

Post by Greendude47 » Sun Feb 06, 2011 2:35 pm

LindaBell009 wrote:1. Rename the file

2. Oen the file in Notebook or any editor that saves text files.

(The file looks like munge except for the top line.)

3. In the top line you will find the variable $codelock_file="shop.php".

4. Change the "shop.php" to "index.php" and save the file.
This works, but it is even simpler as long as you are on a linux or unix based machine.

In the root directory of your store, just rename the file shop.php to index.php

I have been using all sorts of servers and hosts for 15 years and never had an issue in the last 5 years with a server reading various extensions - index.php, .html, .htm

This should work as long as no other file exists in the same directory called index.html or index.htm or default.html or default.htm (more common on windows hosting).

As long as you call it "index" most servers will look for this file first by default. This is all I have done for my stores and they all worked first time around.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

mcarp555
Admin
Admin
Posts: 4088
Joined: Thu Sep 14, 2006 5:19 pm
Location: United Kingdom
Contact:

Re: How to get shop.php to open as the default

Post by mcarp555 » Sun Feb 06, 2011 4:12 pm

It's recommended you use directoryindex shop.php in your .htaccess file instead of renaming the shop.php file. The reason for this is that every time a new upgrade is released, a large number of users forget they've renamed their previous shop.php file. The software then throws an error message warning people that they have a version mismatch problem (trying to use the old index.php file with the new upgrade).

Using the directoryindex command is a "set-and-forget" procedure you only have to do once.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

Greendude47
Experience Level 1
Experience Level 1
Posts: 10
Joined: Thu Jan 27, 2011 11:24 pm

Re: How to get shop.php to open as the default

Post by Greendude47 » Sun Feb 06, 2011 4:37 pm

mcarp555 wrote:It's recommended you use directoryindex shop.php in your .htaccess file instead of renaming the shop.php file. The reason for this is that every time a new upgrade is released, a large number of users forget they've renamed their previous shop.php file. The software then throws an error message warning people that they have a version mismatch problem (trying to use the old index.php file with the new upgrade).

Using the directoryindex command is a "set-and-forget" procedure you only have to do once.
Very Good Point. Question though, why not use index.php instead of shop.php as part of future releases as default? After all, the AOM store is meant to be installed into it's own directory is it not?

Or... make this an option in the admin panel - e.g. point to shop.php or index.php as a site setting option - with a field to enter the alt file name if index.php is not used - then even with upgrades the potential error is caught and updated prior in a config file.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

radite
Experience Level 1
Experience Level 1
Posts: 15
Joined: Tue May 10, 2011 11:20 pm
Contact:

Re: How to get shop.php to open as the default

Post by radite » Tue May 10, 2011 11:24 pm

for me, I just create index.html file then optimized the SEO and include link to shop.php,
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

kspros
Experience Level 1
Experience Level 1
Posts: 21
Joined: Sat Feb 11, 2012 10:47 am

Re: How to get shop.php to open as the default

Post by kspros » Wed Feb 15, 2012 11:12 pm

I renamed shop.php to index.php after I uploaded to the server. I did the renaming on the FTP server via FileZilla.

Have a look at my shop:
http://www.saleslead247.com
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

User avatar
littletoons
Experience Level 10
Experience Level 10
Posts: 1208
Joined: Mon Oct 01, 2007 9:53 am
Location: Atlanta, Georgia USA
Contact:

Re: How to get shop.php to open as the default

Post by littletoons » Thu Feb 16, 2012 8:04 am

But if you have a lot of stores to upgrade in the future, you have to remember to rename the file again and again. It's better to do what Mike suggested and place that one line in your .htaccess file.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

srh2174
Posts: 1
Joined: Fri Sep 21, 2012 10:45 am

Re: How to get shop.php to open as the default

Post by srh2174 » Fri Sep 21, 2012 10:47 am

If I use the .htaccess fix the page is loaded without the css. It is just one long full width page with no colors.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

mcarp555
Admin
Admin
Posts: 4088
Joined: Thu Sep 14, 2006 5:19 pm
Location: United Kingdom
Contact:

Re: How to get shop.php to open as the default

Post by mcarp555 » Fri Sep 21, 2012 10:56 am

Then you're having some sort of error with the .htaccess file.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest