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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:28:35+00:00 2026-05-28T13:28:35+00:00

I am porting a lot of content from flat file site to WordPress and

  • 0

I am porting a lot of content from flat file site to WordPress and have my .htaccess redirect for each page as follows:

redirect 301 /01-chapter1.html  http://www.mydomain.com/section1/chapter-1/

Within this content there are a number of anchor links defined as follows:

<a name="106">Link 106</a>

My question is, will the redirect above also handle these anchor links so that old page anchor:

http://www.mydomain.com/01-chapter1.html#106

gets redirected to new page anchor:

http://www.mydomain.com/section1/chapter-1/#106

Hope it does and that I do not have to implement separate redirects for thousands of anchors 🙁

Many thanks in advance for your advice.


ANSWER

Well I implemented the original redirect I posted:

redirect 301 /01-chapter1.html  http://www.mydomain.com/section1/chapter-1/

Tested this FF/IE/Chrome and for whatever reason the redirect seems to be behaving exactly as I hoped without any additional parameters.

external links to:

http://www.mydomain.com/01-chapter1.html#106

are redirecting perfectly to the in page anchor links:

http://www.mydomain.com/section-1/chapter-1/#106

Thanks for the good advice anyway but so far so good!

  • 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-28T13:28:36+00:00Added an answer on May 28, 2026 at 1:28 pm

    Sadly, it does not do that. Check out this blog post:
    http://www.mikeduncan.com/named-anchors-are-not-sent/

    You can try to redirect client-side with JavaScript instead.

    edit: More information:

    The 301 Redirect Cheatsheet shows many redirection options. When combined with the information gleaned from Can you write a 301 redirect to an anchor point?, means that we can write something like:

    RewriteRule ^01-chapter1.html(#.+)?$ /section1/chapter-1/$1 [R=301,NE]
    

    Not really sure of the regex syntax though, might need something else.

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

Sidebar

Related Questions

I am porting a legacy system from rails into lift. It has a lot
I have been porting oracle selects, and I have been running across a lot
Porting an application from C# (1.1 framework) to VB.NET (3.5 framework), and I have
I've been tasked with porting/refactoring a Web Application Platform that we have from ASP.NET
I'm porting a lot of math. I'm using over to c++ from java and
I'm porting an application from VB6 to VB.NET and have come across something that
We have a huge application with a lot of classes. We are currently porting
Porting code from 32bit to 64bit. Lots of places with int len = strlen(pstr);
I'm porting the T6963-based LCD driver from AVR-GCC to the microchip C18 compiler. I
After doing a lot of research posting this question. Adding Images from json data

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.