1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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?
    SEMrush
     
    kellogg9, Sep 24, 2016 IP
    SEMrush