0

At this question: mod rewrite to remove file extension, add trailing slash, remove www and redirect to 404 if no file/directory is available

In the solution I see this:
RewriteCond %{DOCUMENT_ROOT}/$1.php -f

Could you please someone explain what $1 means here???

(If the question title is not appropriate, please change it, thanks.)

Community
  • 1
  • 1
Filkor
  • 642
  • 6
  • 18

1 Answers1

1

$1 is the result of the first captured regex previously specified in a RewriteRule statement.

See the official documentation here: http://httpd.apache.org/docs/current/mod/mod_rewrite.html

Pierre-Olivier
  • 3,104
  • 19
  • 37