{"id":64590,"date":"2024-09-09T03:01:00","date_gmt":"2024-09-08T17:01:00","guid":{"rendered":"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=64590"},"modified":"2024-09-08T17:06:06","modified_gmt":"2024-09-08T07:06:06","slug":"almalinux-wordpress-permalink-url-mapping-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/almalinux-wordpress-permalink-url-mapping-tutorial\/","title":{"rendered":"AlmaLinux WordPress Permalink URL Mapping Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/permalink_mapping.gif\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"AlmaLinux WordPress Permalink URL Mapping Tutorial\" src=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/permalink_mapping.gif\" title=\"AlmaLinux WordPress Permalink URL Mapping Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">AlmaLinux WordPress Permalink URL Mapping Tutorial<\/p><\/div>\n<p>On this <a target=\"_blank\" title='WordPress permalinks' href='https:\/\/wordpress.org' rel=\"noopener\">WordPress<\/a> blog (now on AlmaLinux rather than CentOS) you are reading we have this <a target=\"_blank\" title='WordPress permalinks' href='https:\/\/codex.wordpress.org\/Using_Permalinks' rel=\"noopener\">permalink<\/a> arrangement whereby URLs to blog postings have within them a representation of the blog posting title.  We might be dreaming, but we think the arrangements for this &#8220;mapping of URLs&#8221; might have changed with the migration environment change.  This would not be surprising.  We think the way a &#8220;\/&#8221; (forward slash) character that appears in a blog posting title might now &#8220;map&#8221; to a &#8220;-&#8221; (minus) character rather than to nothing that my CentOS dreams never forewarned me of, regarding &#8230; tut, tut!<\/p>\n<p>To remedy this, we started fiddling around with good ol&#8217; TwentyTen theme&#8217;s good ol&#8217; header<sub>good ol&#8217;<\/sub>.php code where we have many places where we simulate what must go on behind the scenes in WordPress<sub>.org<\/sub> based permalink code thinking.  And then, we remembered <i>twin<\/i> good ol&#8217; 404<sub><i>twin<\/i> good ol&#8217;<\/sub>.php methodologies for URLs that are not found, and though many will see this as a klunky solution <font size=1 style=\"background:linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL('\/nandl.jpg');background-repeat:no-repeat;background-size:contain;height:100px;display:inline-block;text-shadow:-1px 1px 1px #ff2d95;\">&#8230; god knows Luna and Nala find it pretty amusing &#8230; <\/font> we <font color=blue>kind of like<\/font> &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n$uparts=explode(\"\/\", $_SERVER['REQUEST_URI']);<br \/>\n<font color=blue>if (strpos($_SERVER['REQUEST_URI'], 'apachephp') !== false) {<br \/>\nheader('Location: ' . str_replace('--','-',str_replace('apachephp', 'apache-php-', $_SERVER['REQUEST_URI'])));<br \/>\nexit;<br \/>\n}<br \/>\nif (strpos($_SERVER['REQUEST_URI'], 'htmljavascript') !== false) {<br \/>\nheader('Location: ' . str_replace('--','-',str_replace('htmljavascript', 'html-javascript-', $_SERVER['REQUEST_URI'])));<br \/>\nexit;<br \/>\n}<br \/>\nif (strpos($_SERVER['REQUEST_URI'], 'phpjavascript') !== false) {<br \/>\nheader('Location: ' . str_replace('--','-',str_replace('phpjavascript', 'php-javascript-', $_SERVER['REQUEST_URI'])));<br \/>\nexit;<br \/>\n}<\/font><br \/>\n<\/code><br \/>\n?><\/p>\n<p>&#8230; as <a target=\"_blank\" title='?' href='https:\/\/www.youtube.com\/watch?v=ajgeaOt_HTQ' rel=\"noopener\">the dawn of<\/a> <span title='Clue ... get it! To ...'>klu<\/span><font size=1><sub title='New klunky York?'>nky<\/sub><\/font> thinking around here?!<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d64590' onclick='var dv=document.getElementById(\"d64590\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/permalink\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d64590' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>On this WordPress blog (now on AlmaLinux rather than CentOS) you are reading we have this permalink arrangement whereby URLs to blog postings have within them a representation of the blog posting title. We might be dreaming, but we think &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/almalinux-wordpress-permalink-url-mapping-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[3849,151,4898,2761,748,917,972,3895,997,2167,1319,1324,1325,1345,1456],"class_list":["post-64590","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-404-php","tag-blog","tag-forward-slash","tag-header-php","tag-mapping","tag-permalink","tag-posting","tag-posting-title","tag-programming","tag-title","tag-tutorial","tag-twentyten","tag-twentyten-theme","tag-url","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/64590"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=64590"}],"version-history":[{"count":12,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/64590\/revisions"}],"predecessor-version":[{"id":64626,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/64590\/revisions\/64626"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=64590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=64590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=64590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}