Mod_ReWrite

hostpc.com

Verified User
Joined
Aug 2, 2003
Messages
1,178
Location
Schenectady, NY
Got this from a customer - I'm hoping the experts here can help me out. In this, he's referring to an Ensim 3.1.x server at Rackshack:

there is something wrong with mod rewrite parsing on the server, so my site is still down. I uploaded the exact same htaccess file that I had on the reackshack server, and got 500 errors on every page. I took out line after line and then and simplified my regex and looked in the error logs to see what was wrong and this is the error I got:

RewriteRule: cannot compile regular expression '^(.*?).html$'

which is obviously a valid regex. Taking out the parenthesis get rid of the error and everything runs fine, but obviously without them I cannot use anything from the requested url in the rewrite without using them. I have no idea what could be happening but I would like to know what is wrong.

thanks for any help you can provide.

Joe
 
Mod_rewrite is designed basically to translate dynamic URLS into looking like static ones. Amazon.com is the best example... it looks like a static URL but the whole thing is dynamic.

It's done for these reasons:

1. easier to read
2. it's very hard to get Google etc to list dynamic pages

Cheers,
Matt
 
Back
Top