O
O
Outsider V.2017-10-11 19:57:01
Apache HTTP Server
Outsider V., 2017-10-11 19:57:01

How to redirect from domain.com/address/ to domain.com#address?

In general, there is a project with JS routing - scripts refer to pages in the form domain.com#page_name, while domain.com/page_name/ is displayed in the browser line.
But if you enter domain.com/page_name/ in the address bar, we get the answer server 404.
Question - what to register in htaccess to redirect from domain.com/page_name/ to domain.com#page_name?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Outsider V., 2017-10-13
@Audiophile

Yes, it's a million dollar question.
RewriteRule ^(.*)/$ #$1 [NE]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question