{"id":10,"date":"2018-04-08T07:02:13","date_gmt":"2018-04-08T07:02:13","guid":{"rendered":"https:\/\/www.onlinenote.in\/htaccess\/?p=10"},"modified":"2019-05-02T11:03:16","modified_gmt":"2019-05-02T05:33:16","slug":"htaccess-file-useful-snippets","status":"publish","type":"post","link":"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/","title":{"rendered":".htaccess file useful snippets"},"content":{"rendered":"<p class=\"info\">If you get 404 page not found error after installation.<\/p>\n<div>In this case your server needs the RewriteBase option to be set. Open the .htaccess file in the main folder and add the following line to it:<\/div>\n<div>\n<pre class=\"lang:default decode:true \">RewriteBase \/<\/pre>\n<p>The .htaccess should look like this:<\/p>\n<pre class=\"lang:default decode:true \">RewriteEngine On\r\nRewriteBase \/\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule ^(.*)$ index.php\/$1 [L]<\/pre>\n<div>If you have installed the application into a sub folder you need to add the sub folder name after the \/<\/div>\n<div>The .htaccess file should look like this in this case:<\/div>\n<div>\n<pre class=\"lang:default decode:true \">RewriteEngine On\r\nRewriteBase \/your_sub_folder\/\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule ^(.*)$ index.php\/$1 [L]<\/pre>\n<p class=\"info\">On\u00a0<strong>Dreamhost<\/strong>\u00a0you have to amend the .htaccess. If you get a \u201cNo Input File\u201d error.<\/p>\n<div>The htaccess file should look like this:<\/div>\n<div>\n<pre class=\"lang:default decode:true \">RewriteEngine On\r\nRewriteBase \/\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule ^(.*)$ index.php\/?$1 [L]<\/pre>\n<p class=\"info\">If you get \u201cno input file specified\u201d error on\u00a0<strong>goDaddy<\/strong>\u00a0web host<\/p>\n<div>\u00a0you need to change the .htaccess as follows:<\/div>\n<div>\n<pre class=\"lang:default decode:true \">&lt;IfModule mod_rewrite.c&gt; \r\nRewriteEngine On \r\nRewriteCond $1 !\\.(gif|jpe?g|png)$ [NC] \r\nRewriteCond %{REQUEST_FILENAME} !-f \r\nRewriteCond %{REQUEST_FILENAME} !-d \r\nRewriteRule ^(.*)$ \/index.php?\/$1 [L] \r\n&lt;\/IfModule&gt;<\/pre>\n<div>This error means that your servers PHP version is not 5.3 or higher. Contact your web host in order to update your PHP version to 5.3 or higher.<\/div>\n<p class=\"info\">If you get a 500 Error after the installation try the following as .htaccess<\/p>\n<pre class=\"lang:default decode:true \">RewriteEngine on\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteCond $1 !^(index\\.php|robots\\.txt)\r\nRewriteRule ^(.*)$ \/index.php?\/$1 [L]<\/pre>\n<p class=\"info\">If you get a 500 Error after the installation try the following as .htaccess<\/p>\n<p>Another<\/p>\n<pre class=\"lang:default decode:true \">Options +FollowSymLinks\r\nRewriteEngine on\r\n\r\nRewriteRule ^([a-z0-9_-]+)\\.html$ index.php\/page\/$1 [L]\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteCond $1 !^(index\\.php|asset|robots\\.txt)\r\nRewriteRule ^(.*)$ index.php?\/$1 [QSA,L]<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you get 404 page not found error after installation. In this case your server needs the RewriteBase option to be set. Open the .htaccess file in the main folder and add the following line to it: RewriteBase \/ The .htaccess should look like this: RewriteEngine On RewriteBase \/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.10 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>.htaccess file useful snippets - htaccess<\/title>\n<meta name=\"description\" content=\"If you have installed the application into a sub folder you need to add the sub folder name after the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\".htaccess file useful snippets - htaccess\" \/>\n<meta property=\"og:description\" content=\"If you have installed the application into a sub folder you need to add the sub folder name after the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/\" \/>\n<meta property=\"og:site_name\" content=\"htaccess\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-08T07:02:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-02T05:33:16+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/\",\"url\":\"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/\",\"name\":\".htaccess file useful snippets - htaccess\",\"isPartOf\":{\"@id\":\"https:\/\/www.onlinenote.in\/htaccess\/#website\"},\"datePublished\":\"2018-04-08T07:02:13+00:00\",\"dateModified\":\"2019-05-02T05:33:16+00:00\",\"author\":{\"@id\":\"\"},\"description\":\"If you have installed the application into a sub folder you need to add the sub folder name after the\",\"breadcrumb\":{\"@id\":\"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.onlinenote.in\/htaccess\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\".htaccess file useful snippets\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.onlinenote.in\/htaccess\/#website\",\"url\":\"https:\/\/www.onlinenote.in\/htaccess\/\",\"name\":\"htaccess\",\"description\":\"Code Snippets\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.onlinenote.in\/htaccess\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":".htaccess file useful snippets - htaccess","description":"If you have installed the application into a sub folder you need to add the sub folder name after the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/","og_locale":"en_US","og_type":"article","og_title":".htaccess file useful snippets - htaccess","og_description":"If you have installed the application into a sub folder you need to add the sub folder name after the","og_url":"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/","og_site_name":"htaccess","article_published_time":"2018-04-08T07:02:13+00:00","article_modified_time":"2019-05-02T05:33:16+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":"","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/","url":"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/","name":".htaccess file useful snippets - htaccess","isPartOf":{"@id":"https:\/\/www.onlinenote.in\/htaccess\/#website"},"datePublished":"2018-04-08T07:02:13+00:00","dateModified":"2019-05-02T05:33:16+00:00","author":{"@id":""},"description":"If you have installed the application into a sub folder you need to add the sub folder name after the","breadcrumb":{"@id":"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.onlinenote.in\/htaccess\/htaccess-file-useful-snippets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.onlinenote.in\/htaccess\/"},{"@type":"ListItem","position":2,"name":".htaccess file useful snippets"}]},{"@type":"WebSite","@id":"https:\/\/www.onlinenote.in\/htaccess\/#website","url":"https:\/\/www.onlinenote.in\/htaccess\/","name":"htaccess","description":"Code Snippets","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.onlinenote.in\/htaccess\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":""}]}},"_links":{"self":[{"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/posts\/10"}],"collection":[{"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":2,"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"predecessor-version":[{"id":39,"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/posts\/10\/revisions\/39"}],"wp:attachment":[{"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}