删除部分网址
我有一个像这样的网址http://example.com/blog/photos/photos/gallery/image/1
。
我需要删除第二个照片文件夹。如何使用 mod_rewrite
和 .htaccess
删除该部分?
为了您的兴趣,/blog 是我的文档根目录。
非常感谢您的任何建议,史蒂夫
编辑
您应该知道 URL 是由 Wordpress 3.0 和 NextgenGallery 生成的。
http://example.com/blog
是我的文档根目录。这意味着我已将 Wordpress 安装到文件夹 blog
中。
blog
之后的第一个 slug 是我与画廊关联的页面。
第二个slug是专辑的名称,可以重命名为您想要的任何内容。它只是我的画廊的占位符。 gallery
是画廊的名称。
i have a url like this http://example.com/blog/photos/photos/gallery/image/1
.
And i need to remove the second photos folder. How do i remove the part using mod_rewrite
and .htaccess
?
For your interest /blog is my document root.
Thanks a lot for any suggestions, Steve
EDIT
You should know that the URLs being generated by Wordpress 3.0 und NextgenGallery.
http://example.com/blog
is my document root. That means i have installed Wordpress into the folder blog
.
The first slug after blog
is the page i have my gallery associated with.
The second slug is the name of the album and could be renamed to everything you want. It is just a placeholder for my galleries. gallery
is the name of the gallery.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您想要进行重定向:
Assuming you want to do a redirect: