小编use*_*735的帖子

301重定向 - 重定向父级但不是子级

我如何重新指导父目录而不是孩子?请参阅下面的具体问题.所有和任何帮助表示赞赏!

家长 -

redirect 301 /community/whats-happening http://www.stapletondenver.com/whats-happening/  
Run Code Online (Sandbox Code Playgroud)
  • 重定向父目录

孩子 -

redirect 301 /community/whats-happening/celebrating-halloween-stapleton http://www.stapletondenver.com/whats-happening/celebrating-halloween-in-stapleton/  
Run Code Online (Sandbox Code Playgroud)

我尝试过其他一些选择但没有成功.见下文:

RewriteRule  ^community/whats-happening/. /whats-happening/ [R=301,L]

RewriteRule ^community/whats-happening/(.*)$ /whats-happening/$1 [R=301,NC,L]

RewriteRule ^/?community/whats-happening/?$ http://www.stapletondenver.com/whats-happening/ [R=301]

RewriteRule ^community/whats-happening/(.*) http://stapletondenver.com/whats-happening/$1 [R=301,L]
RewriteRule ^community/whats-happening/(.*)/(.*)/? http://stapletondenver.com/whats-happening/$1/ [R=301,L]
Run Code Online (Sandbox Code Playgroud)

.htaccess mod-rewrite redirect

1
推荐指数
1
解决办法
1838
查看次数

如何在Wordpress中的echo短代码中添加php echo

我正在尝试使用jQuery Collapse-O-Matic插件为我的标题使用图像,但是我使用的是do_shortcode echo并且在如何在回声中添加回声时有点磕磕绊绊.我尝试了一些选项,包括Heredoc方法,但我不知道如何使用我的特定代码实现.

我在下面添加了我的代码,有人能指出我正确的方向吗?所有和任何帮助表示赞赏,谢谢!

<?php echo do_shortcode('[expand title="<img src='<?php echo get_template_directory_uri(); ?>/img/schedule.png' />" trigpos="below"]this is content..this is content..this is content..this is content..this is content..this is content..this is content..this is content..this is content..this is content..this is content..[/expand]'); ?>
Run Code Online (Sandbox Code Playgroud)

php wordpress echo

0
推荐指数
1
解决办法
1611
查看次数

标签 统计

.htaccess ×1

echo ×1

mod-rewrite ×1

php ×1

redirect ×1

wordpress ×1