0

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?

Shane Madden
  • 114,520
  • 13
  • 181
  • 251
Ty W
  • 101
  • 4

1 Answers1

0

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]
Ty W
  • 101
  • 4