<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>redirect &#8211; Snippets</title>
	<atom:link href="http://wp.djtedfunke.com/tag/redirect/feed/" rel="self" type="application/rss+xml" />
	<link>http://wp.djtedfunke.com</link>
	<description></description>
	<lastBuildDate>Tue, 01 Jan 2019 21:53:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.3</generator>

<image>
	<url>http://wp.djtedfunke.com/wp-content/uploads/2018/12/cropped-front-end_developer-2-512-32x32.png</url>
	<title>redirect &#8211; Snippets</title>
	<link>http://wp.djtedfunke.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Htaccess: redirects date</title>
		<link>http://wp.djtedfunke.com/htaccess-redirects-date/</link>
		
		<dc:creator><![CDATA[tadej]]></dc:creator>
		<pubDate>Tue, 01 Jan 2019 21:53:59 +0000</pubDate>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[redirect]]></category>
		<guid isPermaLink="false">http://wp.djtedfunke.com/?p=123</guid>

					<description><![CDATA[ADDING Permanent redirections for blog posts without date url prefix:]]></description>
										<content:encoded><![CDATA[
<p>ADDING Permanent redirections for blog posts without date url prefix: </p>



<pre class="wp-block-code"><code>RedirectMatch 301 /([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ https://koerbler.com/blog/$4</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Redirection header</title>
		<link>http://wp.djtedfunke.com/redirection-header/</link>
		
		<dc:creator><![CDATA[tadej]]></dc:creator>
		<pubDate>Tue, 01 Jan 2019 21:47:00 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[redirect]]></category>
		<guid isPermaLink="false">http://wp.djtedfunke.com/?p=112</guid>

					<description><![CDATA[Redirect to homepage (e.g. 404):]]></description>
										<content:encoded><![CDATA[
<p>Redirect to homepage (e.g. 404):</p>



<pre class="wp-block-code"><code>header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Redirect cookie</title>
		<link>http://wp.djtedfunke.com/redirect-cookie/</link>
		
		<dc:creator><![CDATA[tadej]]></dc:creator>
		<pubDate>Tue, 01 Jan 2019 21:30:59 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[redirect]]></category>
		<guid isPermaLink="false">http://wp.djtedfunke.com/?p=87</guid>

					<description><![CDATA[Redirect if cookie is set]]></description>
										<content:encoded><![CDATA[
<p>Redirect if cookie is set</p>



<pre class="wp-block-code"><code>function my_cookie_redirect() {

  if(isset($_POST['confirm'])){
    $cookie_value = "true";
    setcookie( "AgeAgreed", $cookie_value, 30 * DAYS_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );

    $confirmano = true;
    wp_redirect(get_bloginfo('url'));
    exit;
  }

  if (!isset($_COOKIE['AgeAgreed']) || $confirmano == true)  {
    global $post;
    $enter_id = icl_object_id(3954, 'page', false);

    if ($post->ID != $enter_id) {
      wp_redirect( get_permalink($enter_id));
      exit;
    }
  }

}
add_action('template_redirect','my_cookie_redirect',0);</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Redirect post type</title>
		<link>http://wp.djtedfunke.com/redirect-post-type/</link>
		
		<dc:creator><![CDATA[tadej]]></dc:creator>
		<pubDate>Tue, 01 Jan 2019 21:30:16 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[redirect]]></category>
		<guid isPermaLink="false">http://wp.djtedfunke.com/?p=85</guid>

					<description><![CDATA[Redirects 301 if post type:]]></description>
										<content:encoded><![CDATA[
<p>Redirects 301 if post type:</p>



<pre class="wp-block-code"><code>function post_redirect() {
    global $wp_query;

    if ( is_archive('member') || is_singular('member') ) :
        $url   = get_bloginfo('url');

        wp_redirect( esc_url_raw( $url.'/about-ebla/' ), 301 );
        exit();
    endif;
}
add_action ( 'template_redirect', 'post_redirect', 1);</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
