Modify the Default Homepage for your Domain
-
- Admin
- Posts: 1879
- Joined: Fri Oct 01, 2004 10:40 pm
- Contact:
Modify the Default Homepage for your Domain
Under normal circumstances, when someone types in your domain name, for example, http://www.yourdomain.com, the default page that it will go to is the "index.html" file found in your main public directory.
But what if you want to customize which page/script is the default for your domain? This becomes very useful for those sites that want to point to the shop.php file that Associate-O-Matic uses or maybe a sub section inside your store.
So how do you do it?
Here are a couple ways to accomplish this...
1. Add a directive to your http.conf within the VirtualHost section related to your domain.
This directive would look something like this:
DirectoryIndex shop.php
Or if you wanted to point to some subcategory within your store:
DirectoryIndex shop.php?mode=Electronics&node=1203558
You'll need to restart your server once the http.conf change is made.
2. You can also add a similar directive to a .htaccess file and place it in your main public directory. This too will accomplish the same thing.
If anyone has any other thoughts/ideas on this particular topic please reply.
Justin
But what if you want to customize which page/script is the default for your domain? This becomes very useful for those sites that want to point to the shop.php file that Associate-O-Matic uses or maybe a sub section inside your store.
So how do you do it?
Here are a couple ways to accomplish this...
1. Add a directive to your http.conf within the VirtualHost section related to your domain.
This directive would look something like this:
DirectoryIndex shop.php
Or if you wanted to point to some subcategory within your store:
DirectoryIndex shop.php?mode=Electronics&node=1203558
You'll need to restart your server once the http.conf change is made.
2. You can also add a similar directive to a .htaccess file and place it in your main public directory. This too will accomplish the same thing.
If anyone has any other thoughts/ideas on this particular topic please reply.
Justin
Last edited by associate-o-matic on Tue May 09, 2006 5:18 pm, edited 1 time in total.
-
- Experience Level 2
- Posts: 95
- Joined: Fri Jan 21, 2005 3:25 pm
- Location: Palm Springs, CA USA
- Contact:
The method you describe is standards compliant and in keeping with web authoring best practices.
There is another quick and dirty way this can be done using a meta tag in the head section of an otherwise blank page.
Between <head> and </head> a line of code that said
<meta http-equiv=Refresh content="0;url=shop.php">
would cause a redirect to the shop.php page after a zero second delay. This file could be saved in the web server document root folder, usually public_html, with a name like index.html.
Some search engines don't much care for redirect pages, but it will work with every web browser I've ever tried.
There is another quick and dirty way this can be done using a meta tag in the head section of an otherwise blank page.
Between <head> and </head> a line of code that said
<meta http-equiv=Refresh content="0;url=shop.php">
would cause a redirect to the shop.php page after a zero second delay. This file could be saved in the web server document root folder, usually public_html, with a name like index.html.
Some search engines don't much care for redirect pages, but it will work with every web browser I've ever tried.
-
- Experience Level 1
- Posts: 38
- Joined: Tue Apr 19, 2005 8:42 am
- Location: Canada
- Contact:
You could also do this
This is the main PHP script that powers Associate-O-Matic. You can rename this file to whatever you'd like so long as it ends in ".php" (e.g index.php, store.php, etc...)
NOTE: If you rename the file, you must also edit the non-encrypted portion of the file where it says $codelock_file="shop.php" to whatever the new name is.
i.e. http://www.yoursite.com/shop.php
so i renamed it to index.php
This is the main PHP script that powers Associate-O-Matic. You can rename this file to whatever you'd like so long as it ends in ".php" (e.g index.php, store.php, etc...)
NOTE: If you rename the file, you must also edit the non-encrypted portion of the file where it says $codelock_file="shop.php" to whatever the new name is.
i.e. http://www.yoursite.com/shop.php
so i renamed it to index.php
-
- Experience Level 1
- Posts: 27
- Joined: Fri Sep 02, 2005 12:02 pm
- Contact:
What?
This sounds wonderful!
Now, can you put it in steps that we non programmers can understand? Please?
Linda, the new gal on the "block"
LindaBell009@yahoo.com
Now, can you put it in steps that we non programmers can understand? Please?
Linda, the new gal on the "block"
LindaBell009@yahoo.com
I've had to do some redirect tricks on my servers, but being lazy, I haven't bothered with the .htaccess file and don't have access to the parent server's conf file.
Soooo. I used cPanel X's rediredt feature and tell it what I want done. It creates the appropriate files, and the only thing I can mess up is name of the file or subdomain being redirected.
This is probably also the easiest way to do it for non-programmers as well. Check with your web host to see if you can make changes like this through the control panel of your server. Most shared servers (those you "rent" from a reseller) use cPanel X or some variation. If they do, redirection is a simple point and click operation. If they have some other control panel, you'll need to contact their tech support.
If you look in the documents that came with AOM, you'll find instructions for changing "shop.php" to "index.php". Make the change in the file and upload it to your server as "index.php"...and then your store becomes the site's main page.
Hope that helps.
Soooo. I used cPanel X's rediredt feature and tell it what I want done. It creates the appropriate files, and the only thing I can mess up is name of the file or subdomain being redirected.
This is probably also the easiest way to do it for non-programmers as well. Check with your web host to see if you can make changes like this through the control panel of your server. Most shared servers (those you "rent" from a reseller) use cPanel X or some variation. If they do, redirection is a simple point and click operation. If they have some other control panel, you'll need to contact their tech support.
If you look in the documents that came with AOM, you'll find instructions for changing "shop.php" to "index.php". Make the change in the file and upload it to your server as "index.php"...and then your store becomes the site's main page.
Hope that helps.
-
- Experience Level 1
- Posts: 27
- Joined: Fri Sep 02, 2005 12:02 pm
- Contact:
Index.Php in instructions
<<If you look in the documents that came with AOM, you'll find instructions for changing "shop.php" to "index.php". Make the change in the file and upload it to your server as "index.php"...and then your store becomes the site's main page. >>
The instructions say:
>>This is the main PHP script that powers Associate-O-Matic. You can rename this file to whatever you'd like so long as it ends in ".php" (e.g index.php, store.php, etc...)
NOTE: If you rename the file, you must also edit the non-encrypted portion of the file where it says $codelock_file="shop.php" to whatever the new name is. <<
I have no idea how to edit this type of file, nor what the <<$codelock_file="shop.php">> means.
So, I'm off to get the file you recomended!
Thanks for a beginner,
The instructions say:
>>This is the main PHP script that powers Associate-O-Matic. You can rename this file to whatever you'd like so long as it ends in ".php" (e.g index.php, store.php, etc...)
NOTE: If you rename the file, you must also edit the non-encrypted portion of the file where it says $codelock_file="shop.php" to whatever the new name is. <<
I have no idea how to edit this type of file, nor what the <<$codelock_file="shop.php">> means.
So, I'm off to get the file you recomended!
Thanks for a beginner,
-
- Experience Level 1
- Posts: 27
- Joined: Fri Sep 02, 2005 12:02 pm
- Contact:
My server has a redirect, TOOOO!
It's called redirect url on my server.
It had a "from part" which already had http://www.MyDomainName.con ____ (a blank place)
So, in the blank place, I added index.html (which my website already had)
For the "to part" I tried to put http://MyDomanName.com/shop.php. It didn't work. So I tried http://www.MyDomainName.com/shop.php.
And it worked!
I don't know why the www. was so important because you can get to my site eather way.
And it doesn't matter.
I'm going to put this in the tricks section of this discussion board.
Thanks for the lead!
It had a "from part" which already had http://www.MyDomainName.con ____ (a blank place)
So, in the blank place, I added index.html (which my website already had)
For the "to part" I tried to put http://MyDomanName.com/shop.php. It didn't work. So I tried http://www.MyDomainName.com/shop.php.
And it worked!
I don't know why the www. was so important because you can get to my site eather way.
And it doesn't matter.
I'm going to put this in the tricks section of this discussion board.
Thanks for the lead!
Actually, you can open the file in Notebook or any editor that saves text files. the file looks like munge except for the top line. That's where you find the variable $codelock_file="shop.php". Change the "shop.php" to "index.php" and save the file...NOTE: If you rename the file, you must also edit the non-encrypted portion of the file where it says $codelock_file="shop.php" to whatever the new name is. <<
I have no idea how to edit this type of file, nor what the <<$codelock_file="shop.php">> means.
I'm glad you figured out how to do it by redirection. That allows you to use AOM as your main page. I had to do the trick above because we want a main page different than the one AOM displays. It's helpful to know more than one way to skin this kitty. . .

-
- Experience Level 1
- Posts: 27
- Joined: Fri Sep 02, 2005 12:02 pm
- Contact:
Thanks
With your permission, I'll put a post in the Tips file so other beginners like me will know how to do it.
-
- Admin
- Posts: 1879
- Joined: Fri Oct 01, 2004 10:40 pm
- Contact:
Site Home Page setting in v2.5
Just an FYI, we've added a new Site Home Page setting to v2.5 that will let you specify how you want the home page to look. No more ambiguity of settings to wondering what will appear on the home page.
The formats are...
Blended:
Lists up to 3 items from each of your site categories. Requires the Site Default Keyword (above) and Site Home Blended Items (below)
Single Item:
Displays a detailed view of a single item (Amazon ASIN). Requires the Site Home Item (below)
Browse Node:
Displays 10 items (with more items paginated) from the node of your choice. Requires the Site Home Node information (below)
ASIN List:
Lists up to 10 ASINs. Requires the Site Home Asins (below)
Mall:
Lists links to your site categories.
Custom HTML:
Displays your own HTML. Requires the Site Home Html (below)
Justin
The formats are...
Blended:
Lists up to 3 items from each of your site categories. Requires the Site Default Keyword (above) and Site Home Blended Items (below)
Single Item:
Displays a detailed view of a single item (Amazon ASIN). Requires the Site Home Item (below)
Browse Node:
Displays 10 items (with more items paginated) from the node of your choice. Requires the Site Home Node information (below)
ASIN List:
Lists up to 10 ASINs. Requires the Site Home Asins (below)
Mall:
Lists links to your site categories.
Custom HTML:
Displays your own HTML. Requires the Site Home Html (below)
Justin
This doesn't work for me. I'm trying to get the shop to resolve to the main domain: http://www.maindomain.combloodwrath wrote:You could also do this
This is the main PHP script that powers Associate-O-Matic. You can rename this file to whatever you'd like so long as it ends in ".php" (e.g index.php, store.php, etc...)
NOTE: If you rename the file, you must also edit the non-encrypted portion of the file where it says $codelock_file="shop.php" to whatever the new name is.
i.e. http://www.yoursite.com/shop.php
so i renamed it to index.php
Not: http://www.domain.com/shop.php
Someone please help me with this. My site is http://www.hankjonesrules.com/shop.php
A simple way is to use .htaccess to re-write URLs. This is how I would rewrite your main directory to shop.php.
Just include this code in a file called .htaccess in the public_html directory and you should be set. Plenty of modrewrite tutorials can be found just searching google.
Just include this code in a file called .htaccess in the public_html directory and you should be set. Plenty of modrewrite tutorials can be found just searching google.
Code: Select all
Order Allow,Deny
Allow from all
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^index.html shop\.php
RewriteRule ^index.php shop\.php
Re: Modify the Default Homepage for your Domain
What about http://www.domain.com/subfolder/shop.php ?
What should I write in .htaccess? Because I can see at http://www.domain.com page layouts seems broken.
What should I write in .htaccess? Because I can see at http://www.domain.com page layouts seems broken.
Re: Modify the Default Homepage for your Domain
Put DirectoryIndex shop.php as the first line of the .htaccess file. Note, the .htaccesss file must be in the same location as your shop.php file.
Who is online
Users browsing this forum: No registered users and 2 guests