Question about RewriteCond

Discussion in 'Apache' started by kellogg9, Sep 24, 2016.

  1. #1
    I'm trying to write a rule set where if the file exists and is named: _index.html or _index.xml or _index.rss or _index.atom or _index.rdf then serve up that specific file:

    RewriteCond %{REQUEST_URI} \/$
    RewriteCond "/_index.(html|xml|rss|atom|rdf)" -f
    RewriteRule .* "/_index.%1" [L]

    My problem is that it seems RewriteCond does not allow regex for the first parameter where i do the extension check (html|xml|rss|atom|rdf).

    How do i fix this?
     
    kellogg9, Sep 24, 2016 IP