user2704766
user2704766

Reputation: 275

Apache Rewrite Directory Index

Basically, if the user agent string contains something then I want DirectoryIndex to be ignored. This doesn't appear to work at all.

Upvotes: 2

Views: 500

Answers (1)

Jon Lin
Jon Lin

Reputation: 143916

You can maybe try something like this:

  DirectoryIndex index.html index.php

  RewriteEngine On
  RewriteCond %{HTTP_USER_AGENT} !Kodi [NC]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ /_h5ai/server/php/index.php [L,QSA]

Upvotes: 1

Related Questions