views:

46

answers:

2

Can anyone tell me how to write an .htaccess mod-rewrite so the url displays ONLY the domain name at all times? No matter which page the user is in, I just want to show the domain name.

Thanks in advance.

+1  A: 

That is not possible. How should all the various resources be identified if not by the URI?

The only thing you can do is to load your pages in a frame.

Gumbo
+1  A: 

1) as others have noted, you can use frames / iframes;

2) you can use session / cookie with Ajax without refreshing page;

3) you can use Ajax alone without refreshing page, if you don't need tracking;

4) using only mod_rewrite, you will need to redirect through domain + path, but user may not notice it, if server responds quickly; for example page at www.example.com:

  • link1 - www.example.com/path1
  • link2 - www.example.com/path2
  • link3 - www.example.com/path3

when user clicks on of links, she is redirected to www.example.com, and actual page is shown using referral / cookie / etc.

For mod_rewrite examples use: google.

wishmesh