The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Help with rewrite rule Reply To: Help with rewrite rule


They only thing it’s missing is the extension of the file on the echo. What am I doing wrong?

You only passed the first subpattern ($1) to your rewritten url. The file extension is inside $2.

Also note that ([^/.]+)/?.<– this dot matches “any character,” and so might cause patterns to match/not match that you might not otherwise expect. You can do \. instead to make it a literal “dot.”