0

i have a problem with my URL that is i have some thing like this

http://somelink.com/mobile/somethinghere

i need it to change it to something like this:

http://somelink.com/mobile/index.html

the somethinghere in the url will change dynamically i dont need that.

So is there any way to avoid that and replace it with the other.

PeeHaa
73.1k60 gold badges194 silver badges264 bronze badges
asked Apr 29, 2011 at 4:37
4
  • 1
    what is the something in here? Commented Apr 29, 2011 at 4:40
  • somethinghere in the url.that will always change Commented Apr 29, 2011 at 4:47
  • somethinghere is some pages in the URL Commented Apr 29, 2011 at 4:47
  • 1
    can you give a second example, it is kind of obscure Commented Apr 29, 2011 at 4:51

3 Answers 3

1

Use

location.href = 'http://somelink.com/mobile/index.html'
answered Apr 29, 2011 at 4:39
Sign up to request clarification or add additional context in comments.

Comments

0

If you are loading content dynamically and don't want the url to change, use $.load('pageToLoad', function() { }), or modify the location of the window like this: window.location.href='blah'

answered Apr 29, 2011 at 4:40

Comments

0

If Somethingthere is some page on your site, you can write some script on that page which will redirect to Index.html. I think you can use window.onload() to do that.

answered Apr 29, 2011 at 4:54

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.