Here are the mod_rewrite rules you would use depending on how you've configured the above settings. They would either go in a .htaccess file that you'd place in the same location as your shop.php file or you'd place them in your http.conf file
NOTE:
The rules have not changed since v3.0.6 so no need to change your existing rules if you are upgrading from that version.
DO NOT USE the Underscore setting and rules if you have an existing store using mod_rewrite. IT WILL CAUSE YOUR OLD LINKS TO DIE IN SEARCH ENGINES.
If you see a 500 or 404 error on any pages after setting up your rules, it is a problem with the rules themselves. They will need to be tweaked for your server. Let us know if you see either of these errors... we can help. Set Mod Rewrite to No until we can help you resolve the problem. Then email us the RULE SET # you are using and the URL(s) where you see the problem.
Mod Rewrite Rules
(select the rule set that matches your settings)
RULE SET 1 Url Separator: Hyphen Url Ends With: .html Url With Name: Yes
RULE SET 2 Url Separator: Hyphen Url Ends With: .html Url With Name: No
RULE SET 3 Url Separator: Hyphen Url Ends With: [nothing] Url With Name: Yes
RULE SET 4 Url Separator: Hyphen Url Ends With: [nothing] Url With Name: No
RULE SET 5 Url Separator: Underscore Url Ends With: .html Url With Name: Yes
RULE SET 6 Url Separator: Underscore Url Ends With: .html Url With Name: No
RULE SET 7 Url Separator: Underscore Url Ends With: [nothing] Url With Name: Yes
RULE SET 8 Url Separator: Underscore Url Ends With: [nothing] Url With Name: No
RULE SET 1
Last Updated: v3.0.6
Url Separator: Hyphen
Url Ends With: .html
Url With Name: Yes |
RewriteEngine on
RewriteRule ^home shop.php
RewriteRule ^reviews-([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1&n=$2&i=$3&p=$4&a=reviews
RewriteRule ^buy-([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([A-Za-z]+)-([0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1&n=$2&i=$3&m=$4&p=$5&a=buy
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9+_"]+)-([A-Za-z0-9+_]+)-([a-z]+)-([0-9]+).html shop.php?c=$1&n=$2&k=$3&t=$4&s=$5&p=$6
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9+_"]+)-([a-z]+)-([0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1&n=$2&k=$3&s=$4&p=$5
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([a-z]+)-([0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1&n=$2&s=$3&p=$4
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1&n=$2&i=$3
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1&n=$2
RewriteRule ^page-([A-Za-z0-9+"]+).html shop.php?a=$1
RewriteRule ^([A-Za-z0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1
RewriteRule ^item-([A-Za-z0-9]+) shop.php?i=$1 RewriteRule ^search-([A-Za-z0-9+_"]+) shop.php?k=$1 |
RULE SET 2
Last Updated: v3.0.6
Url Separator: Hyphen
Url Ends With: .html
Url With Name: No |
RewriteEngine on
RewriteRule ^home shop.php
RewriteRule ^reviews-([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([0-9]+).html shop.php?c=$1&n=$2&i=$3&p=$4&a=reviews
RewriteRule ^buy-([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([A-Za-z]+)-([0-9]+).html shop.php?c=$1&n=$2&i=$3&m=$4&p=$5&a=buy
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9+_"]+)-([A-Za-z0-9+_]+)-([a-z]+)-([0-9]+).html shop.php?c=$1&n=$2&k=$3&t=$4&s=$5&p=$6
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9+_"]+)-([a-z]+)-([0-9]+).html shop.php?c=$1&n=$2&k=$3&s=$4&p=$5
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([a-z]+)-([0-9]+).html shop.php?c=$1&n=$2&s=$3&p=$4
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+).html shop.php?c=$1&n=$2&i=$3
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+).html shop.php?c=$1&n=$2
RewriteRule ^page-([A-Za-z0-9+"]+).html shop.php?a=$1
RewriteRule ^([A-Za-z0-9]+).html shop.php?c=$1
RewriteRule ^item-([A-Za-z0-9]+) shop.php?i=$1
RewriteRule ^search-([A-Za-z0-9+_"]+) shop.php?k=$1
|
RULE SET 3
Last Updated: v3.0.6
Url Separator: Hyphen
Url Ends With: [nothing]
Url With Name: Yes |
RewriteEngine on
RewriteRule ^home shop.php
RewriteRule ^reviews-([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([0-9]+)-([A-Za-z0-9_]+) shop.php?c=$1&n=$2&i=$3&p=$4&a=reviews
RewriteRule ^buy-([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([A-Za-z]+)-([0-9]+)-([A-Za-z0-9_]+) shop.php?c=$1&n=$2&i=$3&m=$4&p=$5&a=buy
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9+_"]+)-([A-Za-z0-9+_]+)-([a-z]+)-([0-9]+) shop.php?c=$1&n=$2&k=$3&t=$4&s=$5&p=$6
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9+_"]+)-([a-z]+)-([0-9]+)-([A-Za-z0-9_]+) shop.php?c=$1&n=$2&k=$3&s=$4&p=$5
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([a-z]+)-([0-9]+)-([A-Za-z0-9_]+) shop.php?c=$1&n=$2&s=$3&p=$4
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([A-Za-z0-9_]+) shop.php?c=$1&n=$2&i=$3
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9_]+) shop.php?c=$1&n=$2
RewriteRule ^page-([A-Za-z0-9+"]+) shop.php?a=$1
RewriteRule ^([A-Za-z0-9]+)-([A-Za-z0-9_]+)/?$ shop.php?c=$1
RewriteRule ^item-([A-Za-z0-9]+) shop.php?i=$1 RewriteRule ^search-([A-Za-z0-9+_"]+) shop.php?k=$1 |
RULE SET 4
Last Updated: v3.0.6
Url Separator: Hyphen
Url Ends With: [nothing]
Url With Name: No |
RewriteEngine on
RewriteRule ^home shop.php
RewriteRule ^reviews-([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([0-9]+) shop.php?c=$1&n=$2&i=$3&p=$4&a=reviews
RewriteRule ^buy-([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([A-Za-z]+)-([0-9]+) shop.php?c=$1&n=$2&i=$3&m=$4&p=$5&a=buy
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9+_"]+)-([A-Za-z0-9+_]+)-([a-z]+)-([0-9]+) shop.php?c=$1&n=$2&k=$3&t=$4&s=$5&p=$6
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9+_"]+)-([a-z]+)-([0-9]+) shop.php?c=$1&n=$2&k=$3&s=$4&p=$5
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([a-z]+)-([0-9]+)/?$ shop.php?c=$1&n=$2&s=$3&p=$4
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)/?$ shop.php?c=$1&n=$2&i=$3
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)/?$ shop.php?c=$1&n=$2
RewriteRule ^page-([A-Za-z0-9+"]+) shop.php?a=$1
RewriteRule ^([A-Za-z0-9]+)/?$ shop.php?c=$1
RewriteRule ^item-([A-Za-z0-9]+) shop.php?i=$1 RewriteRule ^search-([A-Za-z0-9+_"]+) shop.php?k=$1 |
RULE SET 5
Last Updated: v3.0.7
2007-09-29
Url Separator: Underscore
Url Ends With: .html
Url With Name: Yes |
RewriteEngine on
RewriteRule ^home shop.php
RewriteRule ^reviews_([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9]+)_([0-9]+)_([A-Za-z0-9-]+).html shop.php?c=$1&n=$2&i=$3&p=$4&a=reviews
RewriteRule ^buy_([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9]+)_([A-Za-z]+)_([0-9]+)_([A-Za-z0-9-]+).html shop.php?c=$1&n=$2&i=$3&m=$4&p=$5&a=buy
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9+"-]+)_([A-Za-z0-9+-]+)_([a-z]+)_([0-9]+).html shop.php?c=$1&n=$2&k=$3&t=$4&s=$5&p=$6
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9+"-]+)_([a-z]+)_([0-9]+)_([A-Za-z0-9-]+).html shop.php?c=$1&n=$2&k=$3&s=$4&p=$5
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([a-z]+)_([0-9]+)_([A-Za-z0-9-]+).html shop.php?c=$1&n=$2&s=$3&p=$4
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9]+)_([A-Za-z0-9-]+).html shop.php?c=$1&n=$2&i=$3
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9-]+).html shop.php?c=$1&n=$2
RewriteRule ^page_([A-Za-z0-9+"]+).html shop.php?a=$1
RewriteRule ^([A-Za-z0-9]+)_([A-Za-z0-9-]+).html shop.php?c=$1
RewriteRule ^item_([A-Za-z0-9]+) shop.php?i=$1
RewriteRule ^search_([A-Za-z0-9+"]+) shop.php?k=$1 |
RULE SET 6
Last Updated: v3.0.7
2007-09-29
Url Separator: Underscore
Url Ends With: .html
Url With Name: No |
RewriteEngine on
RewriteRule ^home shop.php
RewriteRule ^reviews_([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9]+)_([0-9]+).html shop.php?c=$1&n=$2&i=$3&p=$4&a=reviews
RewriteRule ^buy_([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9]+)_([A-Za-z]+)_([0-9]+).html shop.php?c=$1&n=$2&i=$3&m=$4&p=$5&a=buy
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9+"-]+)_([A-Za-z0-9+-]+)_([a-z]+)_([0-9]+).html shop.php?c=$1&n=$2&k=$3&t=$4&s=$5&p=$6
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9+"-]+)_([a-z]+)_([0-9]+).html shop.php?c=$1&n=$2&k=$3&s=$4&p=$5
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([a-z]+)_([0-9]+).html shop.php?c=$1&n=$2&s=$3&p=$4
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9]+).html shop.php?c=$1&n=$2&i=$3
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+).html shop.php?c=$1&n=$2
RewriteRule ^page_([A-Za-z0-9+"]+).html shop.php?a=$1
RewriteRule ^([A-Za-z0-9]+).html shop.php?c=$1
RewriteRule ^item_([A-Za-z0-9]+) shop.php?i=$1
RewriteRule ^search_([A-Za-z0-9+"]+) shop.php?k=$1 |
RULE SET 7
Last Updated: v3.0.7
2007-09-29
Url Separator: Underscore
Url Ends With: [nothing]
Url With Name: Yes |
RewriteEngine on
RewriteRule ^home shop.php
RewriteRule ^reviews_([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9]+)_([0-9]+)_([A-Za-z0-9-]+) shop.php?c=$1&n=$2&i=$3&p=$4&a=reviews
RewriteRule ^buy_([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9]+)_([A-Za-z]+)_([0-9]+)_([A-Za-z0-9-]+) shop.php?c=$1&n=$2&i=$3&m=$4&p=$5&a=buy
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9+"-]+)_([A-Za-z0-9+-]+)_([a-z]+)_([0-9]+) shop.php?c=$1&n=$2&k=$3&t=$4&s=$5&p=$6
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9+"-]+)_([a-z]+)_([0-9]+)_([A-Za-z0-9-]+) shop.php?c=$1&n=$2&k=$3&s=$4&p=$5
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([a-z]+)_([0-9]+)_([A-Za-z0-9-]+) shop.php?c=$1&n=$2&s=$3&p=$4
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9]+)_([A-Za-z0-9-]+) shop.php?c=$1&n=$2&i=$3
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9-]+) shop.php?c=$1&n=$2
RewriteRule ^page_([A-Za-z0-9+"]+) shop.php?a=$1
RewriteRule ^([A-Za-z0-9]+)_([A-Za-z0-9-]+)/?$ shop.php?c=$1
RewriteRule ^item_([A-Za-z0-9]+) shop.php?i=$1
RewriteRule ^search_([A-Za-z0-9+"]+) shop.php?k=$1 |
RULE SET 8
Last Updated: v3.0.7
2007-09-29
Url Separator: Underscore
Url Ends With: [nothing]
Url With Name: No |
RewriteEngine on
RewriteRule ^home shop.php
RewriteRule ^reviews_([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9]+)_([0-9]+) shop.php?c=$1&n=$2&i=$3&p=$4&a=reviews
RewriteRule ^buy_([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9]+)_([A-Za-z]+)_([0-9]+) shop.php?c=$1&n=$2&i=$3&m=$4&p=$5&a=buy
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9+"-]+)_([A-Za-z0-9+-]+)_([a-z]+)_([0-9]+) shop.php?c=$1&n=$2&k=$3&t=$4&s=$5&p=$6
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9+"-]+)_([a-z]+)_([0-9]+) shop.php?c=$1&n=$2&k=$3&s=$4&p=$5
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([a-z]+)_([0-9]+)/?$ shop.php?c=$1&n=$2&s=$3&p=$4
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)_([A-Za-z0-9]+)/?$ shop.php?c=$1&n=$2&i=$3
RewriteRule ^([A-Za-z0-9]+)_([a-z0-9]+)/?$ shop.php?c=$1&n=$2
RewriteRule ^page_([A-Za-z0-9+"]+) shop.php?a=$1
RewriteRule ^([A-Za-z0-9]+)/?$ shop.php?c=$1
RewriteRule ^item_([A-Za-z0-9]+) shop.php?i=$1
RewriteRule ^search_([A-Za-z0-9+"]+) shop.php?k=$1 |
Direct Item and Keyword Links:
Also supported by the above rules is the ability for you to manually link directly to an item if you would like to do so and also to do a keyword search through a link. The examples below use the Url Separator as Hyphen (substitute the Hyphen with an Underscore if you are using that as your Url Separator)...
A direct Item link would look like...
http://www.yoursite.com/item-[ASIN]
A direct Keyword link would look like...
http://www.yoursite.com/search-[Keyword]
Direct Custom Page Links:
Since v3.0, AOM allows you to create Custom Pages inside the Control Panel. You can link to them using the standard " a" parameter such as:
http://www.yourdomain.com/shop.php?a=[Page ID]
If you want to access your Custom Pages through mod_rewrite then you would add the line in red from the appropriate set of rules above. We have defaulted the rule " page-" though this could be anything so long as it doesn't use ( home, reviews- or buy- from the rules above it).
So if you used " page-" in the rule, you would link to your Custom Page as follows:
(created inside the Control)
http://www.yourdomain.com/page-[Page ID]
|