Change all type of re-request keeping the parameters and URL via htaccess

Asked

Viewed 255 times

0

I’ve been racking my brain for hours trying to figure out this htaccess thing

My need is the following, I have a root directory of my system, and each user accesses the system by URL www.meudminio.com.br/filename

But I need to internally load www.meudminio.com.br/system/index.php, without revealing to the user, and without changing the URL, even interacting with the system, if it tries to access:

www.meudminio.com.br/username/accounts? id=20 would www.meudminio.com.br/system/accounts? id=20

htaccess can help me with this?

  • What you already have of htaccess?

  • so I know very little then I was doing: Rewriterule .* www.meudominio.com/system [R=302]

  • it has basically nothing, I really do not understand anything of htaccess, I wanted to know how to make redirects keeping some snippets of the URL and the parameters without changing the address pro user

  • Have you already enabled rewrite? Else add RewriteEngine on at the beginning of htaccess. Try it like this RewriteRule ^(\w*)/contas$ sistema/contas [QSA, L], I’m not sure it’ll work..

  • was active, does not work yet, what I had so far was: Options +Followsymlinks Rewriteengine on Rewritecond %{HTTP_HOST} meudomonio.com.br/dev[nc] Rewriterule (.*) http://www.meudomonio.com.br/dev/system [r=301,nc] but it does not work.

1 answer

0


  • Actually the routes are already configured, still giving error 500 Internal server error

  • See the error log of the web server. There is the reason for error 500

  • Excuse the noobse but where do I see it?

  • In the web server installation directory there should be a "logs" directory. If you use Linux, the logs should be in /var/logs/apache. See more here http://httpd.apache.org/docs/1.3/logs.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.