{"id":1357,"date":"2018-01-19T19:22:44","date_gmt":"2018-01-19T19:22:44","guid":{"rendered":"http:\/\/goofy-trucks.flywheelsites.com\/spell-checking-and-url-tricks\/"},"modified":"2018-01-19T19:24:43","modified_gmt":"2018-01-19T19:24:43","slug":"spell-checking-and-url-tricks","status":"publish","type":"post","link":"https:\/\/phpbuilder.com\/spell-checking-and-url-tricks\/","title":{"rendered":"Spell Checking and URL Tricks"},"content":{"rendered":"<div class=\"phpbuilder-content\">\n<div class=\"phpbuilder-meta\">\n<div class=\"\">By Rasmus Lerdorf<\/div>\n<div class=\"\">on July 30, 2000<\/div>\n<\/p><\/div>\n<div id=\"overflow-content\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/phpbuilder.com\/wp-content\/uploads\/2018\/01\/rasmus.jpg\" alt=\"picture of Rasmus\" class=\"articleAuthorImg\" height=\"92\" width=\"100\" align=\"left\"\/><\/p>\n<div class=\"articlePara\">\nI needed a simple little example that I could use to show how Apache&#8217;s<br \/>\nForceType directive can be put to good use with PHP.  I chose a URL-based spell checker<br \/>\nsince one of the newer features of PHP is built-in spell checking and I thought<br \/>\nthis would interest people as well.  This is of course a rather useless example.<br \/>\nYou can do a lot of quite complex things with the concept presented here.<\/div>\n<div class=\"articlePara\">\nThe <a href=\"http:\/\/www.apache.org\/docs\/mod\/mod_mime.html#forcetype\" target=\"_blank\">ForceType<\/a> directive<br \/>\njust changes the MIME type of something to the given type, overriding all other settings<br \/>\nfor the resource it is applied to.  Since it applies to a resource you have to also somehow<br \/>\ndefine which resources it should apply to.  I normally use a<br \/>\n<a href=\"http:\/\/www.apache.org\/docs\/mod\/core.html#location\" target=\"_blank\">&lt;Location&gt;<\/a> block, but<br \/>\n<a href=\"http:\/\/www.apache.org\/docs\/mod\/core.html#directory\" target=\"_blank\">&lt;Directory&gt;<\/a> and<br \/>\n<a href=\"http:\/\/www.apache.org\/docs\/mod\/core.html#files\" target=\"_blank\">&lt;Files&gt;<\/a> are useful<br \/>\nhere as well.  You should read through<br \/>\n<a href=\"http:\/\/www.apache.org\/docs\/sections.html\" target=\"_blank\">How Directory, Location and Files sections work<\/a><br \/>\nin the Apache documentation to understand the difference between these three better.  The big<br \/>\nadvantage of the &lt;Location&gt; directive is that it can be used in .htaccess files which is<br \/>\ngood for people who don&#8217;t have access to change their server&#8217;s configuration files.<\/div>\n<div class=\"articlePara\">\nTo get an idea of what this does try this URL:<br \/>\n<a href=\"http:\/\/www.lerdorf.on.ca\/s\/bogus\" target=\"_blank\">http:\/\/www.lerdorf.on.ca\/s\/bogus<\/a>.\n<\/div>\n<\/div>\n<p><\/p>\n<div style=\"float: left; padding:15px; color:#17AAF3\">\n<div style=\"background-color:#B6E5FC; font-size:16px; margin-top:1px; padding:1px 4px 1px 4px; color:#000; font-style:bold; float:left;\">1<\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"rasmus199904074658.html?page=2\">2<\/a> <\/div>\n<div style=\"float:left; padding:2px;\"><a class=\"paginationPageLink\" href=\"rasmus199904074658.html?page=2\">Next Page \u00bb<\/a><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>By Rasmus Lerdorf on July 30, 2000 I needed a simple little example that I could use to show how Apache&#8217;s ForceType directive can be put to good use with PHP. I chose a URL-based spell checker since one of the newer features of PHP is built-in spell checking and&#8230; <a href=\"https:\/\/phpbuilder.com\/spell-checking-and-url-tricks\/\" class=\"readmore\"><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1357","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/comments?post=1357"}],"version-history":[{"count":1,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1357\/revisions"}],"predecessor-version":[{"id":2182,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1357\/revisions\/2182"}],"wp:attachment":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/media?parent=1357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/categories?post=1357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/tags?post=1357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}