1

I am having a difficult time figuring out how to have the following work:

  • I am trying to redirect a url in htaccess
  • I am trying to redirect from example.com/test.html to example.com/index#test

I have the following setup

RewriteRule ^test.html http://www.example.com/index#test [R=301,L,B]

However, it is not working because the browser redirects to http://www.example.com/index%23test and returns a page not found.

I have tried many different flags without success.

Thanks,

2

1 Answer 1

3

Actually, a friend help me out with this.

RewriteRule ^test.html http://www.example.com/index#test [R=301,NE,L]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .