PDA

View Full Version : Mod rewrite


l234244
05-31-2005, 03:33 PM
Can someone give a brief tutorial in how they managed to mod rewrite their bookstore. I have added the .htaccess to the bookstore folder and added the name of the folder its positioned in, i.e;

RewriteEngine on
RewriteBase /Amazon ^isbn([^.]+).html$ book.php?isbn=$1
RewriteRule ^key-([^.]+)-([0-9]+).html$ index.php?key=$1&p=$2 [L]


It rewrites the urls as you can see - www.complete-directory.com/Amazon/index.php however when you click on them a server error appears. Is any changes required to the index.php to reflect that of the modrewrite?

Greg
05-31-2005, 04:38 PM
I can't get to your domain at all. Is it down?

EDIT:

I got there, the php is generating the correct URLs. The .htaccess is not working at all.

What OS is your server?

l234244
05-31-2005, 05:30 PM
The website is on a godaddy linux server.

Greg
05-31-2005, 06:11 PM
The website is on a godaddy linux server.

Well I dunno anything about their service. Email and see if you can use the .htaccess file. I think I read you can't, but I wouldn't say for fact.

l234244
06-01-2005, 03:09 AM
There was post about problems with mod rewrite and godaddy but I have all the directory mod rewritten and it works perfect.

Greg
06-01-2005, 09:55 AM
I'm stumped. I hope someone with godaddy experience checks in.

l234244
06-01-2005, 06:32 PM
No worries, I'll test it on another domain/host.