{"id":679,"date":"2021-01-27T15:00:48","date_gmt":"2021-01-27T14:00:48","guid":{"rendered":"https:\/\/devowl.io\/?post_type=knowledge-base&#038;p=679"},"modified":"2021-02-12T10:36:37","modified_gmt":"2021-02-12T09:36:37","slug":"real-physical-media-seo-weiterleiten-funktioniert-nicht","status":"publish","type":"knowledge-base","link":"https:\/\/devowl.io\/de\/knowledge-base\/real-physical-media-seo-redirect-does-not-work\/","title":{"rendered":"SEO-Weiterleitung funktioniert nicht wie erwartet"},"content":{"rendered":"<section class=\"l-section wpb_row height_medium\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row via_flex valign_top type_default stacking_default\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><p>Real Physical Media has moved files in your media library and created redirects from the old URL to the new URL, but they don&#8217;t work? We explain in which cases this can happen and how to solve the problem.<\/p>\n<h2>Cases where redirects do not work<\/h2>\n<p>If you take a look at your Real Physical Media SEO redirects and <span style=\"text-decoration: underline;\">none<\/span> of your redirects are working as expected, most likely the configuration of your web server (Apache2 or NGINX) is wrong.<\/p>\n<p>You know the redirect is not working when you open the old URL and see a plain white screen with an &#8220;Error 404&#8221; or a very technical screen. The main problem is that your web server is not forwarding the request to your WordPress instance. That&#8217;s why the rule to redirect to the new URL can never be applied.<\/p>\n<h2>Solution for Apache2 web server<\/h2>\n<p><em>It is recommended to make the following changes only if you are a technician and know what you are doing! If not, please forward this article to your hosting provider or server admin.<\/em><\/p>\n<p>Please connect to your WordPress installation via FTP and open the file <code class=\"\" data-line=\"\">.htaccess<\/code>. It contains some lines if code like the following:<\/p>\n<pre><code class=\"language-apacheconf\" data-line=\"\"># BEGIN WordPress\n\n# The directives (lines) between `BEGIN WordPress` and `END WordPress` are\n# dynamically generated, and should only be modified via WordPress filters.\n# Any changes to the directives between these markers will be overwritten.\n&lt;IfModule mod_rewrite.c&gt;\nRewriteEngine On\nRewriteBase \/\nRewriteRule ^index\\.php$ - [L]\n\n# add a trailing slash to \/wp-admin\nRewriteRule ^([_0-9a-zA-Z-]+\/)?wp-admin$ $1wp-admin\/ [R=301,L]\n\nRewriteCond %{REQUEST_FILENAME} -f [OR]\nRewriteCond %{REQUEST_FILENAME} -d\nRewriteRule ^ - [L]\nRewriteRule ^([_0-9a-zA-Z-]+\/)?(wp-(content|admin|includes).*) $2 [L]\nRewriteRule ^([_0-9a-zA-Z-]+\/)?(.*\\.php)$ $2 [L]\nRewriteRule . index.php [L]\n&lt;\/IfModule&gt;\n\n# END WordPress<\/code><\/pre>\n<p>This is an example and can differ from your <code class=\"\" data-line=\"\">.htaccess<\/code> file. In this case, we need to add the following lines on <strong>top of the file:<\/strong><\/p>\n<pre><code class=\"language-apacheconf\" data-line=\"\"># Multisite needs a custom 404 redirect (soft redirect, see also https:\/\/stackoverflow.com\/a\/41824195\/5506547)\nErrorDocument 404 \/index.php<\/code><\/pre>\n<h2>Solution for NGINX web server<\/h2>\n<p><em>It is recommended to make the following changes only if you are a technician and know what you are doing! If not, please forward this article to your hosting provider or server admin.<\/em><\/p>\n<p>You need to redirect all error 404 request to the <code class=\"\" data-line=\"\">index.php<\/code> file in your root directory. Afterwards, WordPress can take care to show the correct page (or SEO redirect) for the request. Add the following line to your <code class=\"\" data-line=\"\">server<\/code> configuration to redirect the requests.<\/p>\n<pre><code class=\"language-nginx\" data-line=\"\">error_page 404 \/index.php;<\/code><\/pre>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"template":"","topic":[32],"class_list":["post-679","knowledge-base","type-knowledge-base","status-publish","hentry","topic-common-issues-rpm"],"acf":[],"_links":{"self":[{"href":"https:\/\/devowl.io\/de\/wp-json\/wp\/v2\/knowledge-base\/679","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devowl.io\/de\/wp-json\/wp\/v2\/knowledge-base"}],"about":[{"href":"https:\/\/devowl.io\/de\/wp-json\/wp\/v2\/types\/knowledge-base"}],"version-history":[{"count":0,"href":"https:\/\/devowl.io\/de\/wp-json\/wp\/v2\/knowledge-base\/679\/revisions"}],"wp:attachment":[{"href":"https:\/\/devowl.io\/de\/wp-json\/wp\/v2\/media?parent=679"}],"wp:term":[{"taxonomy":"topic","embeddable":true,"href":"https:\/\/devowl.io\/de\/wp-json\/wp\/v2\/topic?post=679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}