English 中文(简体)
.htaccess 删除了档案的延伸,然后向左侧转播。
原标题:.htaccess remove file extension before hashtag

rel=“nofollow noreferer” http://freddygonzalez.me/dev/update/index.html#mywork.html

我如何利用“htaccess”去除指数。

So it could look like this http://freddygonzalez.me/dev/update/#mywork.html

Also there may be one conflict.If the user press on the logo they get this http://freddygonzalez.me/dev/update/index.html#index.html

因此,有办法使用。

增 编

最佳回答

如果 has子把它交给服务器,那么就应当与它相匹配。

RewriteEngine On
RewriteRule ^(dev/update/)index.html(#.+.html)$ $1$2 [L]
问题回答

URL的碎块没有送至服务器,而是用于当地使用:

[…] the fragment identifier is not used in the scheme-specific processing of a URI; instead, the fragment identifier is separated from the rest of the URI prior to a dereference, and thus the identifying information within the fragment itself is dereferenced solely by the user agent, regardless of the URI scheme.

因此,由于服务器不了解有关碎片的任何情况,因此无法从与摩德摩克利斯公司的请求中删除。

但客户显然确实知道。 因此,你可以使用 Java等一些客户方技术去除或调整碎块。





相关问题
Uncommon regular expressions [closed]

Recently I discovered two amazing regular expression features: ?: and ?!. I was curious of other neat regex features. So maybe you would like to share some tricky regular expressions.

regex to trap img tag, both versions

I need to remove image tags from text, so both versions of the tag: <img src="" ... ></img> <img src="" ... />

C++, Boost regex, replace value function of matched value?

Specifically, I have an array of strings called val, and want to replace all instances of "%{n}%" in the input with val[n]. More generally, I want the replace value to be a function of the match ...

PowerShell -match operator and multiple groups

I have the following log entry that I am processing in PowerShell I m trying to extract all the activity names and durations using the -match operator but I am only getting one match group back. I m ...

Is it possible to negate a regular expression search?

I m building a lexical analysis engine in c#. For the most part it is done and works quite well. One of the features of my lexer is that it allows any user to input their own regular expressions. This ...

regex for four-digit numbers (or "default")

I need a regex for four-digit numbers separated by comma ("default" can also be a value). Examples: 6755 3452,8767,9865,8766,3454 7678,9876 1234,9867,6876,9865 default Note: "default" ...

热门标签