0
I need to hide the directory of url
.
How does it look:
www.meusite.com.br/Site/view/telaInicial.php
How I need:
www.meusite.com.br/telaInicial.php
Man .htaccess
currently:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
Currently my . htaccess only does this function above that has nothing to do with the question, but I do not know if it disturbs the others below
What I’ve tried in mine .htaccess
:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^(?!cake/)(.*)$ cake/$1 [QSA,L]
</IfModule>
But I can think of error 500.
I already took the hash (#) out of the front of the LoadModule rewrite_module modules/mod_rewrite.so
in apache httpd.conf, and already restart apache and nothing.
I know you have an identical question Hide domain directory using htaccess or cakephp router but the reply of it did not serve for me.
Picture of the structure.
Hello Kevin I did an answer, but still can not be sure, could inform the folder structure, like if cake is root or if htdocs is root and as this the structure of this specific project?
– Guilherme Nascimento
root is the Site folder after the other view inside etc... I have an index in the root folder that redirects to
view/telaInicial.php
– KevinF
And the cake folder, is where exactly? Could you send a print to make it easier to understand?
– Guilherme Nascimento
There’s no cake, my structure is different. That’s how I explained it in the question.
– KevinF
Then why on Regex did it
cake/$1
? Could you post the folder structure please? It might even be an image.– Guilherme Nascimento
Okay, follow up on the question the structure image.
– KevinF