如何让.htaccess在url中忽略/#/或/!#/

时间:2021-10-21 11:04:32

I have portfolio page where I use AJAX to switch between pages, my url looks like this when you are in portoflio and some work:

我有投资组合页面,我使用AJAX在页面之间切换,当你在portoflio和一些工作时,我的网址看起来像这样:

.../portfolio/#/work-1

but when I copy paste the full link into browser ( i am thinking of if someone copy paste link to show someone the work ) he gets to .../portfolio page and not to page with the work he wanted, seems like it ignore everything after the #, can i make .htaccess rule to igrone for example /# in urls ?

但是当我复制粘贴到浏览器的完整链接时(我想是否有人复制粘贴链接以显示某人的工作)他进入... /组合页面而不是用他想要的工作页面,似乎它忽略了一切在#之后,我可以将.htaccess规则设为igrone例如/#在urls中吗?

1 个解决方案

#1


0  

No, since the server never sees that part in the first place. You will need to use JavaScript on the portfolio/ page to deal with that.

不,因为服务器从未首先看到该部分。您需要在投资组合/页面上使用JavaScript来处理它。

#1


0  

No, since the server never sees that part in the first place. You will need to use JavaScript on the portfolio/ page to deal with that.

不,因为服务器从未首先看到该部分。您需要在投资组合/页面上使用JavaScript来处理它。