I'm using mod_rewrite
to rewrite the url, but I'd like to leave it fixed, eg:
www.meusite.com.br/index.html
www.meusite.com.br/produtos.html
www.meusite.com.br/contato.html
Ficar apenas:
www.meusite.com.br
How can I do this?
I'm using mod_rewrite
to rewrite the url, but I'd like to leave it fixed, eg:
www.meusite.com.br/index.html
www.meusite.com.br/produtos.html
www.meusite.com.br/contato.html
Ficar apenas:
www.meusite.com.br
How can I do this?
As @Jhonatan Simões said, you can use JavaScript for this. You should put a div, which will be the entire body of the main page and use the jQuery load. Google has a plethora of examples, but to make it easier: link .
For the system to know which page it should load, you have to pass the page url per parameter. Use the POST method, since you want to leave the address bar "clean".
If you do not want all this junk, use some .htaccess tags. It will not be totally as you want, but it will help a lot.
Another tip is: instead of passing parameters by GET (it will get ugly in the url) and POST (it will be problematic if you give F5 or turn the page), passes the necessary information by session variables, cookies or even input hidden . With this, you can leave the url like this: www.mysite.com/page.