0
I have the following url
Angled
My file . htaccess is like this:
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /meuApp/index.html
I would like that inside this directory I save the files inside a subfolder called: frontend
Thus remaining:
minhaApp
|__ frontend
But kept calling it like this: localhost/meuApp
I tried using the code below, but it does redirect to the subdirectory and come back and that’s not what I want
RewriteEngine On
RewriteBase /meuApp
RewriteCond %{REQUEST_URI} !^/meuApp/frontend
RewriteCond %{REQUEST_URI} !^/meuApp/exclude-file1\.html$
RewriteCond %{REQUEST_URI} !^/meuApp/exclude-file2\.html$
RewriteCond %{REQUEST_URI} !^/meuApp/exclude-dir
RewriteRule (.*) frontend/$1 [R=302,L]
And there will be something that should be accessed outside the subfolder?
– Guilherme Nascimento
Only customers who will access the system
– adventistaam
Yes but have static files and scripts outside the front-end folder accessible via URL? Business rules don’t matter yet, the question is about the behavior of urls
– Guilherme Nascimento
No. Files are all inside the frontend folder
– adventistaam
Okay, I’m gonna repeat the question, because every time you answer, you make a different point... What this OUTSIDE frontend folder needs to be accessible via URL in some way or other folders?
– Guilherme Nascimento
No. There’s nothing outside the frontend folder. What you may have is the backend folder that will be in Nodejs, but you will not have files that will need to access via URL
– adventistaam