This is a discussion on static Domain URL???? within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi I wan't to be able to maintain a static URL in the users address bar in their browsers ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi
I wan't to be able to maintain a static URL in the users address bar in their browsers so they browse to www.this-site.ca click a href to http://www.this-site.ca/subDir/index.html but after clicking and displaying the page www.this-site.ca is still displayed in the address bar of their browser |
|
|||
|
merrittr wrote:
> Hi > > > I wan't to be able to maintain a static URL in the users address bar > in their browsers > > so they browse to > > www.this-site.ca click a href to > http://www.this-site.ca/subDir/index.html > > but after clicking and displaying the page www.this-site.ca is still > displayed in the address bar of their browser I highly, highly recommend against it. How will your user bookmark it? Or is that just the point? The only 3 real ways I can think of: - only browser by posting the requested page, where a script will sort out what page to show Advantages: - none Disadvantages: - almost no indexing, heavy on the server (well, more heave then should be). - Use a frame Advantages: - you can more or less use 'normal' HTML Disadvantages: - bad indexing - just google why frames are evil - Use some kind of javascript (Ajax) browsing: Advantages: - seems normal html - could be indexed if the links als work without javascript, allthough the url would then be displayed Disadvantages: - can be quite cumbersome to maintain, and overall a major pain... - if you don't have a failsafe for people wihtout javascript, or older browsers, you page is totally inaccessable to them. That said: do not do it. -- Rik Wasmus |
|
|||
|
Rik wrote: > merrittr wrote: > > Hi > > > > > > I wan't to be able to maintain a static URL in the users address bar > > in their browsers > > > > so they browse to > > > > www.this-site.ca click a href to > > http://www.this-site.ca/subDir/index.html > > yeah, a URI is just that, unique, doing what you have asked for is not only poor way to hide stuff (cannot hide this way) but is against this main stain of the web. Just ask yourself why no big company does it, and there you have your answer - if you are experienced enough to do it well, and still dont do it, then it shouldnt be done. > > but after clicking and displaying the page www.this-site.ca is still > > displayed in the address bar of their browser > > I highly, highly recommend against it. > How will your user bookmark it? Or is that just the point? > > The only 3 real ways I can think of: > - only browser by posting the requested page, where a script will sort out > what page to show > Advantages: > - none > Disadvantages: > - almost no indexing, heavy on the server (well, more heave then > should be). > - Use a frame > Advantages: > - you can more or less use 'normal' HTML > Disadvantages: > - bad indexing > - just google why frames are evil > - Use some kind of javascript (Ajax) browsing: > Advantages: > - seems normal html > - could be indexed if the links als work without javascript, > allthough the url would then be displayed > Disadvantages: > - can be quite cumbersome to maintain, and overall a major pain... > - if you don't have a failsafe for people wihtout javascript, or > older browsers, you page is totally inaccessable to them. > > That said: do not do it. > -- > Rik Wasmus |
|
|||
|
Disregarding the fact this could be less than desireable, you can also
do it using the power of mod_rewrite with mod_proxy. A simple configuration: RewriteEngine On RewriteRule ^/(.*)$ /$1 [P,L] You should change this and test in your environment. One small GOTCHA, though: since we're using mod_proxy to get all the URLs from the webserver itself, all your hits will appear to come from the webserver's IP address (except for the direct accesses). You can sort it out parsing the logfiles and regarding x-forwarded-for information instead of remote-ip. Regards, Ricardo Oliveira http://apache.superbofh.org/ - Apache book in Portuguese |
| Thread Tools | |
| Display Modes | |
|
|