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 7165357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:13:33+00:00 2026-05-28T14:13:33+00:00

I have a URL that is like the following: http://www.example.com/client/project/subdirectory/value/ I would like like

  • 0

I have a URL that is like the following:

http://www.example.com/client/project/subdirectory/value/

I would like like a simple way to be able to change/redirect the URL to the following:

http://www.example.com/client/project/#/subdirectory/value/

Once the redirect is complete, the hash needs to be accessible via JavaScript. I’m okay with a full refresh/redirect, just ideally that I write this once and don’t have to change it again.

In other words, when the site goes live, the URLs will be structured differently, so that:

http://www.example.com/subdirectory/value/

Will change to:

http://www.example.com/#/subdirectory/value/

Edit:

I have tried using this:
RewriteRule ^profile/?$ #/profile/ [ NC,L]

Which doesn’t seem to do anything

Also tried this:
RewriteRule ^profile/?$ /#/profile/ [NC,L]

Which takes me to the root directory

Also tried this:
RewriteRule ^profile/?$ #/profile/ [R,NC,L]

Which adds the whole root path to the server, followed by /%23/profile/

  • 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-05-28T14:13:34+00:00Added an answer on May 28, 2026 at 2:13 pm

    If you have a URL like the following:

    http://localhost/tests/redir/subdirectory/value/
    

    And you want to get it redirected to:

    http://localhost/tests/redir/#/subdirectory/value/
    

    Place a .htaccess file into the directory of tests/redir with the following:

    RewriteEngine On
    RewriteBase /tests/redir
    RewriteRule ^(.*/)$ #/$1 [R,L,NE]
    

    And you will get the wanted redirect. The R flag plays together with the RewriteBase directive. Also the NE flag is necessary so that you can put # literally into the redirect URI.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a site with the following structure: http://www.example.com/folder1/folder2/folder3 I would like to disallow
I have a url like the following: http://www.example.com/cat/دسته/page/2/ As you can see there is
I have an url like this: http://www.w3schools.com/PHP/func_string_str_split.asp I want to split that url to
I have a URL that returns a HTTP 302 redirect, and I would like
I have a site whose URLs look like http://www.example.com/NY-2010/ http://www.example.com/NY-2010/location/ http://www.example.com/NY-2010/something-else/ http://www.example.com/Washington-2009/ http://www.example.com/Washington-2009/location/ http://www.example.com/Washington-2009/something-else/
I have a simple form that looks like so <% remote_form_for post, :url =>
I have a page that is accessed via a URL like this: http://power-coder.net/Test/something.php?id=3#Page1 I
I have an ad network script like the following http://cdn.domain.com/ad.php?variables=etc We have about 10,000
Say I have the following pages: http://www.site.com/folder/page.php?id=89 http://www.site.com/folder/page.php?id=85 http://www.site.com/folder/page.php?id=camel+hump http://www.site.com/folder/page.php?id=76 http://www.site.com/folder/page.php?id=71 http://www.site.com/folder/page.php?id=frog http://www.site.com/folder/page.php?id=62 http://www.site.com/folder/page.php?id=59
I have a URI string like the following: http://www.christlichepartei%F6sterreichs.at/steiermark/ I'm creating a java.lang.URI instance

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.