Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I created the following RewriteRule during development of a site on our dev server which runs Apache 2.2.3:

RewriteEngine on
RewriteRule ^add-ons/(?!=details|download)(.+) /add-ons/details/$2 [NC]

Basically what I'm trying to do is to knock out the /details/ part of the URL so that I can have a link like example.com/add-ons/some-addon/ instead of example.com/add-ons/details/some-addon/.

Unfortunately upon releasing this to the live server, running Apache 1.3.41, I get Error 500: Internal Server Error. I've played around with it but nothing I've tried works. Is this a limitation of Apache 1.3, maybe the forward lookahead isn't allowed?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Rewrote it using a RewriteCond instead of the negative lookahead, this seems to work:

RewriteCond $0 !^add-ons/(details|download) [NC]
RewriteRule ^add-ons/(.+)$ /add-ons/details/$1 [NC,L]
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.