How to 301 redirect to a page with #anchor link

It doesn’t seem possible to redirect to a page with a hashtag(#) in it. Is there a reason for this? Is the a workaround provided by Webflow?

Can you please provide an example of the page you are trying to re-direct to @stephen ?

Thank you,

Waldo

@stephen is on my team, so here’s an example:

Current website → /services-implementation
New website → /services#Implementation

@tomjohn & @stephen after scouring the internet, I’ve found that Server’s cannot detect anchor links (#anchorlinks), so this is not yet possible without an additional server-side script. I recommend putting this in as a Feedback/Wishlist item :smile:

Thank you,

Waldo

I have changed this to a wishlist/feedback item and adjusted the headline for easier indexing.

This is a request to integrate some server side script to allow for adding 301 re-directs with anchor linking capabilities as detailed in the above posts. :smile:

Thank you,

Waldo

Thank you Waldo. It might help the developers to know that with 301 redirects there is an NE (noescape) flag for apache web servers. If you set the NE flag such that ‘RewriteRule ^/anchor/(.+) /bigpage.html#$1 [301, NE]’ then the special character will not be escaped and it will redirect to the correct place.

1 Like

@brryant & @callmevlad ^^^ this would be awesome to have with a lot of sites moving away from multi-pages and more towards the long-scroll. :smile:

Thank you @stephen this is very helpful :smiley:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.