【发布时间】:2014-01-08 13:53:28
【问题描述】:
所以,在开头更形象化:
这是当前的链接结构:
http://example.com/video-slug/wordpress-title-of-the-video-slug
我有一个子域:
http://tv.example.com/
我想要实现的是,当有人点击时:
http://tv.example.com/wordpress-title-of-the-video-slug
发现tv.example.com 等于example.com/video 并打开链接:
http://example.com/video/wordpress-title-of-the-video-slug,但将结构保留在位置栏中:
http://tv.example.com/wordpress-title-of-the-video-slug
【问题讨论】:
-
htaccess 是要走的路!
-
你想要重写,而不是重定向。
-
我很高兴说明这一点,我在这里标记了 .htaccess,所以人们会认为我知道该走哪条路,但我需要编码帮助,因为我的 .htaccess 知识等于 1 度开尔文量表。
-
您是否已经将
tv.example.com指向example.com? -
我有,但后来我得到 tv.example.com/video/title 而不是 tv.example.com/title...
标签: php wordpress .htaccess redirect