{"id":4393,"date":"2015-03-17T20:51:04","date_gmt":"2015-03-17T12:51:04","guid":{"rendered":"http:\/\/rmohan.com\/?p=4393"},"modified":"2015-03-17T22:45:10","modified_gmt":"2015-03-17T14:45:10","slug":"htaccess-or-mod_rewrite-encyclopedia","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=4393","title":{"rendered":".htaccess or mod_rewrite encyclopedia"},"content":{"rendered":"<p>.htaccess or mod_rewrite encyclopedia<br \/>\ncollected here are a variety of practical .htaccess snippets, you can think of the use of almost all here.<\/p>\n<p>Disclaimer : Although these snippets directly copied to your .htaccess file, the vast majority of cases are easy to use, but there are very few cases where you need to modify some of the job. At your own risk.<\/p>\n<p>IMPORTANT NOTE : Apache 2.4 is not compatible changes, especially in terms of access to configuration control. For more information, please refer to this updated document and article .<\/p>\n<p>Table of Contents<\/p>\n<p>Again and redirection<br \/>\nForced www<br \/>\nWww mandatory general method<br \/>\nForced non-www<br \/>\nForced non-www common method<br \/>\nForced HTTPS<br \/>\nBy forcing HTTPS proxy<br \/>\nAdd a slash at the end of compulsory<br \/>\nRemove trailing slashes<br \/>\nRedirect to a page<br \/>\nDirectory alias<br \/>\nScript aliases<br \/>\nRedirect the entire site<br \/>\nClean URL<br \/>\nSecurity<br \/>\nDeny all access<br \/>\nDeny all access (excluding section)<br \/>\nShield reptile \/ malicious access<br \/>\nHidden files and directories<br \/>\nProtect the backup files and source code files<br \/>\nBan directory browsing<br \/>\nProhibit pictures Daolian<br \/>\nProhibit pictures hotlinking (specify name)<br \/>\nPassword Protected Directories<br \/>\nPassword-protected files<br \/>\nVisitor Referrer filtered through<br \/>\nPrevent nesting other pages<br \/>\nPerformance<br \/>\nArchive<br \/>\nSet an expiration header<br \/>\nClose eTags logo<br \/>\nOther<br \/>\nSetting up a PHP variable<br \/>\nCustom Error Pages<br \/>\nForced Download<br \/>\nBlocking the download<br \/>\nRun cross-domain font reference<br \/>\nAuto UTF-8 Encode<br \/>\nSwitching PHP version<br \/>\nProhibit IE Compatibility View<br \/>\nSupports WebP image format<br \/>\nAgain and redirection<\/p>\n<p>Note: you first need to install and enable server mod_rewrite module.<\/p>\n<p>Forced www<\/p>\n<p>RewriteEngine on<br \/>\nRewriteCond %{HTTP_HOST} ^example\\.com [NC]<br \/>\nRewriteRule ^(.*)$ http:\/\/www.example.com\/$1 [L,R=301,NC]<\/p>\n<p>Www mandatory general method<\/p>\n<p>RewriteCond %{HTTP_HOST} !^$<br \/>\nRewriteCond %{HTTP_HOST} !^www\\. [NC]<br \/>\nRewriteCond %{HTTPS}s ^on(s)|<br \/>\nRewriteRule ^ http%1:\/\/www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]<br \/>\nThis method can be used at any site.<\/p>\n<p>Forced non-www<\/p>\n<p>WWW what is good, or non-www good, no conclusion, if you like without the www, you can use the following script:<\/p>\n<p>RewriteEngine on<br \/>\nRewriteCond %{HTTP_HOST} ^www\\.example\\.com [NC]<br \/>\nRewriteRule ^(.*)$ http:\/\/example.com\/$1 [L,R=301]<\/p>\n<p>Forced non-www common method<\/p>\n<p>RewriteEngine on<br \/>\nRewriteCond %{HTTP_HOST} ^www\\.<br \/>\nRewriteCond %{HTTPS}s ^on(s)|off<br \/>\nRewriteCond http%1:\/\/%{HTTP_HOST} ^(https?:\/\/)(www\\.)?(.+)$<br \/>\nRewriteRule ^ %1%3%{REQUEST_URI} [R=301,L]<\/p>\n<p>Forced HTTPS<\/p>\n<p>RewriteEngine on<br \/>\nRewriteCond %{HTTPS} !on<br \/>\nRewriteRule (.*) https:\/\/%{HTTP_HOST}%{REQUEST_URI}<\/p>\n<p># Note: It&#8217;s also recommended to enable HTTP Strict Transport Security (HSTS)<br \/>\n# on your HTTPS website to help prevent man-in-the-middle attacks.<br \/>\n# See https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Security\/HTTP_strict_transport_security<br \/>\n&lt;IfModule mod_headers.c&gt;<br \/>\nHeader always set Strict-Transport-Security &#8220;max-age=31536000; includeSubDomains&#8221;<br \/>\n&lt;\/IfModule&gt;<br \/>\nBy forcing HTTPS proxy<\/p>\n<p>If you use a proxy, this method is useful for you.<\/p>\n<p>RewriteCond %{HTTP:X-Forwarded-Proto} !https<br \/>\nRewriteRule (.*) https:\/\/%{HTTP_HOST}%{REQUEST_URI}<br \/>\nAdd a slash at the end of compulsory<\/p>\n<p>RewriteCond %{REQUEST_URI} \/+[^\\.]+$<br \/>\nRewriteRule ^(.+[^\/])$ %{REQUEST_URI}\/ [R=301,L]<\/p>\n<p>Remove trailing slashes<\/p>\n<p>RewriteCond %{REQUEST_FILENAME} !-d<br \/>\nRewriteRule ^(.*)\/$ \/$1 [R=301,L]<\/p>\n<p>Redirect to a page<\/p>\n<p>Redirect 301 \/oldpage.html http:\/\/www.example.com\/newpage.html<br \/>\nRedirect 301 \/oldpage2.html http:\/\/www.example.com\/folder\/<br \/>\nSource<\/p>\n<p>Directory alias<\/p>\n<p>RewriteEngine On<br \/>\nRewriteRule ^source-directory\/(.*) target-directory\/$1<br \/>\nScript aliases<\/p>\n<p>FallbackResource \/index.fcgi<br \/>\nThis example has an index.fcgi file in some directory, and any requests within that directory that fail to<br \/>\nresolve a filename\/directory will be sent to the index.fcgi script.<br \/>\nIt\u2019s good if you want baz.foo\/some\/cool\/path to be handled by baz.foo\/index.fcgi (which also supports requests to baz.foo)<br \/>\nwhile maintaining baz.foo\/css\/style.css and the like. Get access to the original path from the PATH_INFO environment variable,<br \/>\nas exposed to your scripting environment.<\/p>\n<p>RewriteEngine On<br \/>\nRewriteRule ^$ index.fcgi\/ [QSA,L]<br \/>\nRewriteCond %{REQUEST_FILENAME} !-f<br \/>\nRewriteCond %{REQUEST_FILENAME} !-d<br \/>\nRewriteRule ^(.*)$ index.fcgi\/$1 [QSA,L]<br \/>\nThis is a less efficient version of the FallbackResource directive (because using mod_rewrite is more complex than just handling the FallbackResource directive), but it\u2019s also more flexible.<\/p>\n<p>Redirect the entire site<\/p>\n<p>Redirect 301 \/ http:\/\/newsite.com\/<br \/>\nThis way does it with links intact. That is www.oldsite.com\/some\/crazy\/link.html will become<br \/>\nwww.newsite.com\/some\/crazy\/link.html. This is extremely helpful when you are just \u201cmoving\u201d a site to a new domain. Source<\/p>\n<p>Clean URL<\/p>\n<p>This snippet lets you use \u201cclean\u201d URLs \u2014 those without a PHP extension, e.g.<br \/>\nexample.com\/users instead of example.com\/users.php.<br \/>\nRewriteEngine On<br \/>\nRewriteCond %{SCRIPT_FILENAME} !-d<br \/>\nRewriteRule ^([^.]+)$ $1.php [NC,L]<br \/>\nSource<\/p>\n<p>Security<\/p>\n<p>Deny all access<\/p>\n<p>## Apache 2.2<br \/>\nDeny from all<\/p>\n<p>## Apache 2.4<br \/>\n# Require all denied<\/p>\n<p>But wait, this will lock you out from your content as well! Thus introducing\u2026<br \/>\nDeny all access (excluding section)<\/p>\n<p>## Apache 2.2<br \/>\nOrder deny,allow<br \/>\nDeny from all<br \/>\nAllow from xxx.xxx.xxx.xxx<\/p>\n<p>## Apache 2.4<br \/>\n# Require all denied<br \/>\n# Require ip xxx.xxx.xxx.xxx<\/p>\n<p>xxx.xxx.xxx.xxx is your IP. If you replace the last three digits with 0\/12 for example, this will specify a range of IPs within the same network, thus saving you the trouble to list all allowed IPs separately.<\/p>\n<p>Source<\/p>\n<p>Now of course there\u2019s a reversed version:<\/p>\n<p>Shield reptile \/ malicious access<br \/>\n## Apache 2.2<br \/>\nOrder deny,allow<br \/>\nAllow from all<br \/>\nDeny from xxx.xxx.xxx.xxx<br \/>\nDeny from xxx.xxx.xxx.xxy<\/p>\n<p>## Apache 2.4<br \/>\n# Require all granted<br \/>\n# Require not ip xxx.xxx.xxx.xxx<br \/>\n# Require not ip xxx.xxx.xxx.xxy<\/p>\n<p>Hidden files and directories<\/p>\n<p>Hidden files and directories (those whose names start with a dot .) should most, if not all, of the time be secured. For example: .htaccess, .htpasswd, .git, .hg\u2026<\/p>\n<p>RewriteCond %{SCRIPT_FILENAME} -d [OR]<br \/>\nRewriteCond %{SCRIPT_FILENAME} -f<br \/>\nRewriteRule &#8220;(^|\/)\\.&#8221; &#8211; [F]<br \/>\nAlternatively, you can just raise a Not Found error, giving the attacker dude no clue:<\/p>\n<p>RedirectMatch 404 \/\\..*$<br \/>\nProtect the backup files and source code files<\/p>\n<p>These files may be left by some text\/html editors (like Vi\/Vim) and pose a great security danger if exposed to public.<\/p>\n<p>&lt;FilesMatch &#8220;(\\.(bak|config|dist|fla|inc|ini|log|psd|sh|sql|swp)|~)$&#8221;&gt;<br \/>\n## Apache 2.2<br \/>\nOrder allow,deny<br \/>\nDeny from all<br \/>\nSatisfy All<\/p>\n<p>## Apache 2.4<br \/>\n# Require all denied<br \/>\n&lt;\/FilesMatch&gt;<br \/>\nSource<\/p>\n<p>Ban directory browsing<br \/>\nOptions All -Indexes<br \/>\nProhibit pictures Daolian<\/p>\n<p>RewriteEngine on<br \/>\n# Remove the following line if you want to block blank referrer too<br \/>\nRewriteCond %{HTTP_REFERER} !^$<\/p>\n<p>RewriteCond %{HTTP_REFERER} !^http(s)?:\/\/(.+\\.)?example.com [NC]<br \/>\nRewriteRule \\.(jpg|jpeg|png|gif|bmp)$ &#8211; [NC,F,L]<\/p>\n<p># If you want to display a &#8220;blocked&#8221; banner in place of the hotlinked image,<br \/>\n# replace the above rule with:<br \/>\n# RewriteRule \\.(jpg|jpeg|png|gif|bmp) http:\/\/example.com\/blocked.png [R,L]<br \/>\nProhibit pictures hotlinking (specify name)<\/p>\n<p>Sometimes you want to from some bad guys only.<\/p>\n<p>RewriteEngine on<br \/>\nRewriteCond %{HTTP_REFERER} ^http(s)?:\/\/(.+\\.)?badsite\\.com [NC,OR]<br \/>\nRewriteCond %{HTTP_REFERER} ^http(s)?:\/\/(.+\\.)?badsite2\\.com [NC,OR]<br \/>\nRewriteRule \\.(jpg|jpeg|png|gif)$ &#8211; [NC,F,L]<\/p>\n<p># If you want to display a &#8220;blocked&#8221; banner in place of the hotlinked image,<br \/>\n# replace the above rule with:<br \/>\n# RewriteRule \\.(jpg|jpeg|png|gif|bmp) http:\/\/example.com\/blocked.png [R,L]<\/p>\n<p>Password Protected Directories<\/p>\n<p>First you need to create a .htpasswd file somewhere in the system:<\/p>\n<p>htpasswd -c \/home\/fellowship\/.htpasswd boromir<br \/>\nThen you can use it for authentication:<\/p>\n<p>AuthType Basic<br \/>\nAuthName &#8220;One does not simply&#8221;<br \/>\nAuthUserFile \/home\/fellowship\/.htpasswd<br \/>\nRequire valid-user<br \/>\nAuthName &#8220;One still does not simply&#8221;<br \/>\nAuthType Basic<br \/>\nAuthUserFile \/home\/fellowship\/.htpasswd<\/p>\n<p>&lt;Files &#8220;one-ring.o&#8221;&gt;<br \/>\nRequire valid-user<br \/>\n&lt;\/Files&gt;<\/p>\n<p>&lt;FilesMatch ^((one|two|three)-rings?\\.o)$&gt;<br \/>\nRequire valid-user<br \/>\n&lt;\/FilesMatch&gt;<\/p>\n<p>Visitor Referrer filtered through<br \/>\nThis denies access for all users who are coming from (referred by) a specific domain.<br \/>\nSource<br \/>\nRewriteEngine on<br \/>\n# Options +FollowSymlinks<br \/>\nRewriteCond %{HTTP_REFERER} somedomain\\.com [NC,OR]<br \/>\nRewriteCond %{HTTP_REFERER} anotherdomain\\.com<br \/>\nRewriteRule .* &#8211; [F]<\/p>\n<p>Prevent nesting other pages<\/p>\n<p>This prevents the website to be framed (i.e. put into an iframe tag), when still allows framing for a specific URI.<\/p>\n<p>SetEnvIf Request_URI &#8220;\/starry-night&#8221; allow_framing=true<br \/>\nHeader set X-Frame-Options SAMEORIGIN env=!allow_framing<br \/>\nPerformance<\/p>\n<p>Archive<\/p>\n<p>&lt;IfModule mod_deflate.c&gt;<\/p>\n<p># ?? compression for mangled headers.<br \/>\n# http:\/\/developer.yahoo.com\/blogs\/ydn\/posts\/2010\/12\/pushing-beyond-gzipping<br \/>\n&lt;IfModule mod_setenvif.c&gt;<br \/>\n&lt;IfModule mod_headers.c&gt;<br \/>\nSetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\\s*,?\\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding<br \/>\nRequestHeader append Accept-Encoding &#8220;gzip,deflate&#8221; env=HAVE_Accept-Encoding<br \/>\n&lt;\/IfModule&gt;<br \/>\n&lt;\/IfModule&gt;<\/p>\n<p># Compress all output labeled with one of the following MIME-types<br \/>\n# (for Apache versions below 2.3.7, you don&#8217;t need to enable `mod_filter`<br \/>\n# and can remove the `&lt;IfModule mod_filter.c&gt;` and `&lt;\/IfModule&gt;` lines<br \/>\n# as `AddOutputFilterByType` is still in the core directives).<br \/>\n&lt;IfModule mod_filter.c&gt;<br \/>\nAddOutputFilterByType DEFLATE application\/atom+xml \\<br \/>\napplication\/javascript \\<br \/>\napplication\/json \\<br \/>\napplication\/rss+xml \\<br \/>\napplication\/vnd.ms-fontobject \\<br \/>\napplication\/x-font-ttf \\<br \/>\napplication\/x-web-app-manifest+json \\<br \/>\napplication\/xhtml+xml \\<br \/>\napplication\/xml \\<br \/>\nfont\/opentype \\<br \/>\nimage\/svg+xml \\<br \/>\nimage\/x-icon \\<br \/>\ntext\/css \\<br \/>\ntext\/html \\<br \/>\ntext\/plain \\<br \/>\ntext\/x-component \\<br \/>\ntext\/xml<br \/>\n&lt;\/IfModule&gt;<\/p>\n<p>&lt;\/IfModule&gt;<\/p>\n<p>Source<\/p>\n<p>Set an expiration header<\/p>\n<p>xpires headers tell the browser whether they should request a specific file from the server or just grab it from the cache. It is advisable to set static content\u2019s expires headers to something far in the future.<br \/>\nIf you don\u2019t control versioning with filename-based cache busting, consider lowering the cache time for resources like CSS and JS to something like 1 week. Source<\/p>\n<p>&lt;IfModule mod_expires.c&gt;<br \/>\nExpiresActive on<br \/>\nExpiresDefault &#8220;access plus 1 month&#8221;<\/p>\n<p># CSS<br \/>\nExpiresByType text\/css &#8220;access plus 1 year&#8221;<\/p>\n<p># Data interchange<br \/>\nExpiresByType application\/json &#8220;access plus 0 seconds&#8221;<br \/>\nExpiresByType application\/xml &#8220;access plus 0 seconds&#8221;<br \/>\nExpiresByType text\/xml &#8220;access plus 0 seconds&#8221;<\/p>\n<p># Favicon (cannot be renamed!)<br \/>\nExpiresByType image\/x-icon &#8220;access plus 1 week&#8221;<\/p>\n<p># HTML components (HTCs)<br \/>\nExpiresByType text\/x-component &#8220;access plus 1 month&#8221;<\/p>\n<p># HTML<br \/>\nExpiresByType text\/html &#8220;access plus 0 seconds&#8221;<\/p>\n<p># JavaScript<br \/>\nExpiresByType application\/javascript &#8220;access plus 1 year&#8221;<\/p>\n<p># Manifest files<br \/>\nExpiresByType application\/x-web-app-manifest+json &#8220;access plus 0 seconds&#8221;<br \/>\nExpiresByType text\/cache-manifest &#8220;access plus 0 seconds&#8221;<\/p>\n<p># Media<br \/>\nExpiresByType audio\/ogg &#8220;access plus 1 month&#8221;<br \/>\nExpiresByType image\/gif &#8220;access plus 1 month&#8221;<br \/>\nExpiresByType image\/jpeg &#8220;access plus 1 month&#8221;<br \/>\nExpiresByType image\/png &#8220;access plus 1 month&#8221;<br \/>\nExpiresByType video\/mp4 &#8220;access plus 1 month&#8221;<br \/>\nExpiresByType video\/ogg &#8220;access plus 1 month&#8221;<br \/>\nExpiresByType video\/webm &#8220;access plus 1 month&#8221;<\/p>\n<p># Web feeds<br \/>\nExpiresByType application\/atom+xml &#8220;access plus 1 hour&#8221;<br \/>\nExpiresByType application\/rss+xml &#8220;access plus 1 hour&#8221;<\/p>\n<p># Web fonts<br \/>\nExpiresByType application\/font-woff2 &#8220;access plus 1 month&#8221;<br \/>\nExpiresByType application\/font-woff &#8220;access plus 1 month&#8221;<br \/>\nExpiresByType application\/vnd.ms-fontobject &#8220;access plus 1 month&#8221;<br \/>\nExpiresByType application\/x-font-ttf &#8220;access plus 1 month&#8221;<br \/>\nExpiresByType font\/opentype &#8220;access plus 1 month&#8221;<br \/>\nExpiresByType image\/svg+xml &#8220;access plus 1 month&#8221;<br \/>\n&lt;\/IfModule&gt;<br \/>\nClose eTags logo<\/p>\n<p>By removing the ETag header, you disable caches and browsers from being able to validate files, so they are forced to rely on your Cache-Control and Expires header. Source<\/p>\n<p>&lt;IfModule mod_headers.c&gt;<br \/>\nHeader unset ETag<br \/>\n&lt;\/IfModule&gt;<br \/>\nFileETag None<br \/>\nMiscellaneous<\/p>\n<p>Setting up a PHP variable<\/p>\n<p>php_value &lt;key&gt; &lt;val&gt;<\/p>\n<p># For example:<br \/>\nphp_value upload_max_filesize 50M<br \/>\nphp_value max_execution_time 240<br \/>\nCustom Error Pages<\/p>\n<p>ErrorDocument 500 &#8220;Houston, we have a problem.&#8221;<br \/>\nErrorDocument 401 http:\/\/error.example.com\/mordor.html<br \/>\nErrorDocument 404 \/errors\/halflife3.html<br \/>\nForced Download<\/p>\n<p>Sometimes you want to the browser to download some content instead of displaying it.<br \/>\n&lt;Files *.md&gt;<br \/>\nForceType application\/octet-stream<br \/>\nHeader set Content-Disposition attachment<br \/>\n&lt;\/Files&gt;<\/p>\n<p>Blocking the download<\/p>\n<p>Sometimes you want to ?? the browser to display some content instead of downloading it.<\/p>\n<p>&lt;FilesMatch &#8220;\\.(tex|log|aux)$&#8221;&gt;<br \/>\nHeader set Content-Type text\/plain<br \/>\n&lt;\/FilesMatch&gt;<br \/>\nRun cross-domain font reference<\/p>\n<p>CDN-served webfonts might not work in Firefox or IE due to CORS. This snippet solves the problem.<\/p>\n<p>&lt;IfModule mod_headers.c&gt;<br \/>\n&lt;FilesMatch &#8220;\\.(eot|otf|ttc|ttf|woff|woff2)$&#8221;&gt;<br \/>\nHeader set Access-Control-Allow-Origin &#8220;*&#8221;<br \/>\n&lt;\/FilesMatch&gt;<br \/>\n&lt;\/IfModule&gt;<br \/>\nSource<\/p>\n<p>Auto UTF-8 Encode<\/p>\n<p>Your text content should always be UTF-8 encoded, no?<\/p>\n<p># Use UTF-8 encoding for anything served text\/plain or text\/html<br \/>\nAddDefaultCharset utf-8<\/p>\n<p># UTF-8 for a number of file formats<br \/>\nAddCharset utf-8 .atom .css .js .json .rss .vtt .xml<\/p>\n<p>Source<\/p>\n<p>Switching PHP version<\/p>\n<p>If you\u2019re on a shared host, chances are there are more than one version of PHP installed, and sometimes you want a specific version for your website. For example, Laravel requires PHP &gt;= 5.4. The following snippet should switch the PHP version for you.<\/p>\n<p>AddHandler application\/x-httpd-php55 .php<\/p>\n<p># Alternatively, you can use AddType<br \/>\nAddType application\/x-httpd-php55 .php<\/p>\n<p>Compatibility View in IE may affect how some websites are displayed. The following snippet should<br \/>\nIE to use the Edge Rendering Engine and disable the Compatibility View.<\/p>\n<p>&lt;IfModule mod_headers.c&gt;<br \/>\nBrowserMatch MSIE is-msie<br \/>\nHeader set X-UA-Compatible IE=edge env=is-msie<br \/>\n&lt;\/IfModule&gt;<br \/>\nSupports WebP image format<\/p>\n<p>If WebP images are supported and an image with a .webp extension and the same name is found at the same place as the jpg\/png image that is going to be served, then the WebP image is served instead.<\/p>\n<p>RewriteEngine On<br \/>\nRewriteCond %{HTTP_ACCEPT} image\/webp<br \/>\nRewriteCond %{DOCUMENT_ROOT}\/$1.webp -f<br \/>\nRewriteRule (.+)\\.(jpe?g|png)$ $1.webp [T=image\/webp,E=accept:1]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>.htaccess or mod_rewrite encyclopedia collected here are a variety of practical .htaccess snippets, you can think of the use of almost all here.<\/p>\n<p>Disclaimer : Although these snippets directly copied to your .htaccess file, the vast majority of cases are easy to use, but there are very few cases where you need to modify some [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4393"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4393"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4393\/revisions"}],"predecessor-version":[{"id":4394,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4393\/revisions\/4394"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}