Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8586301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:16:42+00:00 2026-06-11T22:16:42+00:00

I am working on a site that has dynamic content. When you click an

  • 0

I am working on a site that has dynamic content.

When you click an article, it changes to address using the push state.

Example:

http://www.some-site.com/news/ – Before clicking a news item

http://www.some-site.com/news/dynamic-url/ – after clicking news item

But as pushstate does not work in IE or older browsers, I’ve rewritten it to use jQuery.address so it changes the hash in the url instead only for IE.

The problem now, is say someone sends a link to the site to a friend that they copied from Chrome and their friend uses IE, it will start appending the new has to that url.

Example:

http://www.some-site.com/news/dynamic-url/ – URL sent to friend

http://www.some-site.com/news/dynamic-url/#!/dynamic-url – URL after friend visits the site

So, I’m stuck on how to rewrite/redirect them. As, the hash never gets sent to Apache.
I’ve seen on twitter, they do exactly what I want, but I am unable to figure out how.

https://twitter.com/#!/google gets redirected to https://twitter.com/google and it works in IE.

Any help is much appreciated and if you don’t understand please ask me to elaborate.

As suggested by David Thomas, here is the function.

var permalink = function(title, id, permalink){
    var current = siteUrl + type + (order ? '/orderBy/' + order : '');
    var newUrl = current + '/' + permalink + '/';
    if(jQuery.browser.msie){
        newUrl = '/' + permalink + '/';
        jQuery.address.value(newUrl);
    }
    else{
        stateNum++;
        window.history.pushState({state: stateNum}, title, newUrl);
    }
    jQuery('title').html('SITE - ' + title);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:16:43+00:00Added an answer on June 11, 2026 at 10:16 pm

    After thinking it through for a while, I could only find one solution.

    I’ll post it here in case anyone is in a similar situation.

    My solution, was a little hacky. If the browser is IE and has a fragment of url after a certain point, I count that as the name of news item. Once I have the name, I redirect them to the suitable url.

    var permalink = function(title, id, permalink){
        var current = siteUrl + type + (order ? '/orderBy/' + order : '');
        var newUrl = '/' + permalink + '/';
        if(jQuery.browser.msie){
            jQuery.address.value(newUrl);
        }
        else{
            current = siteUrl + type + (order ? '/orderBy/' + order : '');
            newUrl = current + '/' + permalink + '/';
            stateNum++;
            window.history.pushState({state: stateNum}, title, newUrl);
        }
        jQuery('title').html('SITE - ' + title);
    }
    jQuery(document).ready(function(){
        jQuery.address.crawlable(true);
        if(jQuery.browser.msie){
            if(jQuery.address.value() == '/'){
                var currentPermalink = window.location.toString();
                currentPermalink = currentPermalink.split(type);
                if(currentPermalink[1] !== '/'){
                    window.location = siteUrl + type + '/#!' + currentPermalink[1];
                    jQuery.address.value(newUrl);
                }
            }
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok Im working on a site that has a sidebar and a main content
I'm working on a database site now that has the URL structure: example.com/f.php?id=12 I'd
I am working on a site that has a lot of content that is
I'm working on a site that has a requirement to share session between a
I'm working on a site that has about 3,000-4,000 dynamically generated pages, and I'm
I'm working on a site that still has a lot of scripts in ColdFusion.
I am working on a medium size web site that has plenty of custom
I've been working on an internal site that has Apache / PHP running. I
I'm working on a site that has quite a few pages that fall outside
I'm working on a site that has routes to actions which render Partial Views.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.