I have this site which has wordpress along with a couple of .html files. I want both of them to work.

As of now only .html files work and the wordpress site is getting ignored. Would be be possible to use Conditional DirectoryIndex to make both work.

The wordpress files have the following format,

and so on... (all have "?" in the URL)

I could put to use the “?” found in the URL in case of wordpress files and make DirectoryIndex load index.php. If “?” isn’t found in the URL then make DirectoryIndex load index.html.

This is what I’m looking for in a pseudo-code format,

   then (DirectoryIndex index.php)
   then (DirectoryIndex index.html)

If it is possible to do, could anyone rewrite the above in a way apache would undertsand or point me to a resource which would help me do it myself.

Read more here: Conditional DirectoryIndex to load wordpress and html on same site


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

WordPress related questions and answers: