473,799 Members | 3,339 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to replace a URL in the address bar

Hi--

How can one replace the URL in the address bar to a "friendly alternative"?

Is there a way to do this with JavaScript?

Is there a way to do this ASP.NET?
For example, suppose I have a site that has the URL...

http://www.MySite.com/

....and when I browse to one section in this site, the URL may look like
this...

http://www.MySite.com/Products/

.....and when I browse to another section, the URL may look like this...

http://www.MySite.com/Data/Page.htm?...Description=52

....and so on, with many different ugly URL strings....

....now, what I want to do is to make the URL in the browser's window always
look like this...

http://www.MySite.com

....no matter what page I am on in the site.
What do you think?

Is there a way to do this with JavaScript?

Is there a way to do this ASP.NET?

Please advise.

Thank you very much.

--Mark
Jul 20 '05 #1
5 36387
Mark Kamoski wrote:
How can one replace the URL in the address bar to a "friendly
alternative"?
The addressbar can not display anything other then a real URI that
references the page currently being viewed in the top frame.
Is there a way to do this with JavaScript?
No

For example, suppose [...] I browse to one section in this site, the URL may look like this... http://www.MySite.com/Data/Page.htm?...Description=52

...and so on, with many different ugly URL strings....
Use some form of address rewriting (or just clever scripting) so that you
have it in the form:

http://www.MySite.com/Data/17/52/

.... having your content management system spit out more useful ways to
reference the data would be a good idea.
...now, what I want to do is to make the URL in the browser's window
always look like this... http://www.MySite.com

...no matter what page I am on in the site. What do you think?


I think its a good way to screw up the ability of visitors to bookmark
pages, but possible with frames (although search engines will bypass them
as usual).

http://evolt.org/article/Search_Engi...049/index.html
and
http://evolt.org/article/Search_Engi...171/index.html
might be of use (although you would have to adapt them to ASP)
--
David Dorward http://dorward.me.uk/
Jul 20 '05 #2
mk******@yahoo. com (Mark Kamoski) writes:
....and when I browse to another section, the URL may look like this...

http://www.MySite.com/Data/Page.htm?...Description=52 ...now, what I want to do is to make the URL in the browser's window always
look like this...

http://www.MySite.com


The typical method is to let the front page of www.mysite.com be a
frameset with only one frame. Then all navigation happens inside the frames,
and the top URL doesn't change.

But don't think for a second that you are doing it for the users. You
are doing it because *you* want a cleaner look on your page. The users
either don't care, or care and don't like people munging their address
line.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #3

"Mark Kamoski" <mk******@yahoo .com> wrote in message
news:45******** *************** ***@posting.goo gle.com...
Hi--

How can one replace the URL in the address bar to a "friendly alternative"?
Is there a way to do this with JavaScript?

Is there a way to do this ASP.NET?
For example, suppose I have a site that has the URL...

http://www.MySite.com/

...and when I browse to one section in this site, the URL may look like
this...

http://www.MySite.com/Products/

....and when I browse to another section, the URL may look like this...

http://www.MySite.com/Data/Page.htm?...Description=52

...and so on, with many different ugly URL strings....

...now, what I want to do is to make the URL in the browser's window always look like this...

http://www.MySite.com

...no matter what page I am on in the site.
What do you think?

Is there a way to do this with JavaScript?

Is there a way to do this ASP.NET?

Please advise.

Thank you very much.

--Mark


Use FRAMES - I think there is a NOFRAME tag that you can use for search
engines and web crawlers - Mind you, some search engines don't entirely
follow non-html linked pages (thus

http://www.MySite.com/Data/Page.htm?...Description=52

may not be followed by some crawlers meaning there will be little loss using
frames...

JavaScript cannot change the address bar - its not a failure, its a security
feature.
Jul 20 '05 #4
Randell--

Thank you for your reply.

As I understand it, if one uses frames as noted above, then it is
possible to change the URL.

Do you (or does anyone) have any sample code for doing this with
frames?

Please advise.

Thank you.

--Mark

"Randell D." <yo************ **************@ yahoo.com> wrote in message news:<xbGeb.838 $6C4.499@pd7tw1 no>...
"Mark Kamoski" <mk******@yahoo .com> wrote in message
news:45******** *************** ***@posting.goo gle.com...
Hi--

How can one replace the URL in the address bar to a "friendly
alternative"?

Is there a way to do this with JavaScript?

Is there a way to do this ASP.NET?
For example, suppose I have a site that has the URL...

http://www.MySite.com/

...and when I browse to one section in this site, the URL may look like
this...

http://www.MySite.com/Products/

....and when I browse to another section, the URL may look like this...

http://www.MySite.com/Data/Page.htm?...Description=52

...and so on, with many different ugly URL strings....

...now, what I want to do is to make the URL in the browser's window
always
look like this...

http://www.MySite.com

...no matter what page I am on in the site.
What do you think?

Is there a way to do this with JavaScript?

Is there a way to do this ASP.NET?

Please advise.

Thank you very much.

--Mark


Use FRAMES - I think there is a NOFRAME tag that you can use for search
engines and web crawlers - Mind you, some search engines don't entirely
follow non-html linked pages (thus

http://www.MySite.com/Data/Page.htm?...Description=52

may not be followed by some crawlers meaning there will be little loss using
frames...

JavaScript cannot change the address bar - its not a failure, its a security
feature.

Jul 20 '05 #5
Lee
Mark Kamoski said:

Randell--

Thank you for your reply.

As I understand it, if one uses frames as noted above, then it is
possible to change the URL.


No, that's not quite correct.
You cannot change the URL, period.
If you use frames, the displayed URL will be that of the frameset
page. You can then load other pages in a frame, and the displayed
URL will still be that of the frameset.
No JavaScript is required to do this. It's basic HTML.
Note, however, that not all browsers support frames.

Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1354
by: Joey Martin | last post by:
Couple questions when parsing using replace. I have the following text I am parsing: $650 Number of Bedrooms 3 Air Conditioning? Yes Original Ad SOUTH, 3BR, air, basement. $650. Call 278-4171. First Appeared in the Newspaper Thursday, October 30, 2003 $775
3
4766
by: Miguel J. Jiménez | last post by:
Hi, I have the following node: <node> Some text here with lots of inside it... </node> and I would like it to transfrom it using XSLT to the following: Some text<br/> here with</br> lots of</br> inside it... Being <br/> HTML tags and not simple text like &lt;br/&gt;
24
4512
by: Wim Roffal | last post by:
Is there a possibility to do a string replace in javascript without regular experessions. It feels like using a hammer to crash an egg. Wim
2
14939
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data in the format that I need it in order to create the reports that we use. So far this has proven to be successful for the reports that I am doing and the data that I am pulling into it. I just have one challenge that may require a lot of work and I...
1
8299
by: dig314 | last post by:
MSAccess linking to Oracle 8 tables with Microsoft ODBC for Oracle driver I need to change the email address of all users because our domain has changed. Is there a way to do this with SQL and not an Edit Replace from Access? SELECT REPLACE ('domainOld.com', 'domainOld.com', 'domainNew.com') FROM User_Table
10
14040
by: localpricemaps | last post by:
i have some html that looks like this <address style="color:#">34 main,<br> Boston, MA</address> and i am trying to use the replace function to get rid of the <Br> that i scrape out using this code: for oText in incident.fetchText( oRE): strTitle += oText.strip()
3
2879
by: g0c | last post by:
hi, how to hide or replace email addresses in php mail function with something like "group" so the email addresses to which email is sent are not visible ? i have : $subs = "email1@dot.com, emai2@dot.com, email3@dot.com" $header .= "To : email@notset.com\r\n";
9
2199
by: MrHelpMe | last post by:
Hello again experts, I have successfully pulled data from an LDAP server and now what I want to do is drop the data into a database table. The following is my code that will insert the data but that has problems. FullName=Request.Form("Name") Email=Request.Form("Email") GivenName=Request.Form("GivenName")
5
3234
by: MoslyChang | last post by:
Hi, All When I look at effective c++,item2 and item3. I have some basic questions , Does anyone be familar with this topic? it suggests const is perfer to #define, then I think how to replace #define with const. example: 2 header file StringGrid1.h StringGrid2.h
3
10052
by: Ned White | last post by:
Hi All, To replace some substrings in a string value, i use Regex.Replace method mulptiple times like; strmemo = "new Data for user; Name:@@Name , Surname:@@Surname, Address:@@Address"; strmemo = Regex.Replace(strmemo,"@@Name", value1.ToString()); strmemo = Regex.Replace(strmemo,"@@Surname", value2.ToString()); strmemo = Regex.Replace(strmemo,"@@Address", value3.ToString());
0
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10482
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10251
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10225
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.