Forum Moderators: phranque
#change products id's to actual keywords in the address bar
RewriteRule ^([0-9A-Za-z]+)/([0-9A-Za-z]+)/([0-9A-Za-z]+)/index.html itemdetails.php?products_sku=$3
Basically it changes this /computer/cables/skunumber/index.html into itemdetails.php?products_sku=skunumber. The problem I am having though is that some of my skus have a dash in them. An exmaple could be PS2-6foot.
I was curious how to edit ([0-9A-Za-z]+) to include a dash when there is one present. I guess it would be considered a special character.
Also another problem I might as well mention that I am having is with custom error pages. I tried using the ErrorDocument 404 /error.php line in my .htaccess but for some reason this doesn't work for me. It says the file cannot be found even though its there. What could the problem be? I don't have access to the Apache configuration files so I can't look in there.
Thanks for your help.
Wes
See the regular-expressions tutorial cited in our forum charter [webmasterworld.com] for more info.
Jim