I have a directory inside my root folder called "mydir" where there are several files, currently I access these files like this:
My question is how do I configure .htaccess so I can access (show the user) these files like this:
But I do not want to redirect all files, only ".html".
I'm trying on my .htaccess, however I get a 404:
RewriteRule "^/(.+)$" "/mydir/$1"
Where "^ / (. +) $" is the regular expression, which I read in the apache does this mean:
^ = anchor to start the expression.
/ = project root.
(.) = means any character.
+ = repeat the "." one or more times.
/ mydir / = directory which I want to replace.
$ 1 = variable referring to regular expression in parentheses.
$ = anchor to end the expression.
And yet, when I try to access link , I get a page 404 not found error. See that I did not even get the html just yet, but I imagine it would be something like "^ / (.. html) $" where you need to escape. with a backslash.