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?

0

1 Answer 1

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] 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.