简单地删除URL段用的.htaccess [英] Simply remove a url segment with .htaccess
本文介绍了简单地删除URL段用的.htaccess的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只是试图让这个网址:
I am simply trying to get this URL:
http://foo.com/entry/random-entry-123
重定向到:
http://foo.com/random-entry-123
随机入境-123是动态的。
不同的每个条目。
任何帮助,这是极大的AP preciated!
The "random-entry-123" is dynamic.
Different for each entry.
Any help with this is greatly appreciated!
推荐答案
假设没有进一步的改写正在使用中,并在所有链接/项/
要改写,然后试试这个:
Assuming no further rewrites are in use, and all links inside /entry/
are to rewritten, then try this:
RewriteEngine on
RewriteBase /
RewriteRule ^/entry/(.+)$ /$1 [L,QSA]
失去 [L]
如果有进一步重写领先的文件中。
Lose the [L]
if there are further rewrites ahead in the file.
这篇关于简单地删除URL段用的.htaccess的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文