Redirect to a URL with a hashtag in it - possible???

5 replies
  • WEB DESIGN
  • |
Hi Warriors

I'm hoping someone can help me (not sure if this is possible or not as I've searched the web and can't find a solution - BUT what I want to do doesn't sound like rocket science so I would be amazed if it's NOT possible)

Basically what I want to do is redirect people to a URL with a hashtag in it....

So someone visits my webpage (e.g. www.mywebsite.com/freebie ) before being redirected after 5 seconds to another page with a hashtag in it - e.g. www.mywebsite.com/oto#example

I use a simple script which works a treat and redirects people to the webpage BUT the hashtag doesn't work, so instead of taking them to www.mywebsite.com/oto#example as I want them to, they are just taken to www.mywebsite.com/oto

Is there any way to direct people to a page with a hashtag in the url and for the hashtag to remain?

Hopefully you get what I mean :-)

If anyone could help I would appreciate it a lot

Thanks

Daniel
#hashtag #redirect #url
  • Profile picture of the author KirkMcD
    How are you doing the redirect?
    In htaccess, Meta Refresh, php header, etc...?
    It could also be the receiving website stripping it out.
    {{ DiscussionBoard.errors[5062988].message }}
    • Profile picture of the author Daniel Flower
      Hi

      Thanks for the reply.

      I have just solved my own problem :-) Using Google's url shortner works for some reason (bit.ly or any of the others don't)

      Thanks again

      Daniel
      {{ DiscussionBoard.errors[5063231].message }}
  • Profile picture of the author mojojuju
    You should be able to redirect to a page with a "#" using just meta refresh (and without Google's url shortener) without a problem.

    Here's an example
    Signature

    :)

    {{ DiscussionBoard.errors[5063653].message }}

Trending Topics