apache - htaccess rewrite scenario -
i have scenario have 2 files, 1 index.php , other index.htm.
how setup rewrite condition / rule if index.htm exists on server in subdirectory, pass request file. , if file not exist pass request /index.php?
it depends on subdirectory structure, 1 solution use index.php exclusively, , write php @ front of index.php check existence of other file:
if(file_exists("subfolder/index.htm")) exit(file_get_contents("subfolder/index.htm"));
otherwise, check out flags rewritecond
Comments
Post a Comment