I have a onepage-design and the anchors are defined to the ID's of some section-containers. Is it possible to change the anchors who are applied to the same document?

For example, i need something like that:
change: directory/index.php#premium-office
to: directory/premium-office.html

If anything is unclear, please let me know.

有帮助吗?

解决方案

You can't do anything like that server side, because the fragment part of the URL (the thing after the # symbol) isn't sent to the server.

Because of that you can only use JavaScript to make the redirect.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top