{"id":5729,"date":"2014-04-06T10:30:07","date_gmt":"2014-04-06T10:30:07","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/06\/set-htaccess-php_value-for-url-rewrited-path-only-collection-of-common-programming-errors\/"},"modified":"2014-04-06T10:30:07","modified_gmt":"2014-04-06T10:30:07","slug":"set-htaccess-php_value-for-url-rewrited-path-only-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/06\/set-htaccess-php_value-for-url-rewrited-path-only-collection-of-common-programming-errors\/","title":{"rendered":"Set htaccess php_value for url rewrited path only-Collection of common programming errors"},"content":{"rendered":"<p>Okay since you cannot upgrade your Apache to latest versions here is one <strong>work-around way<\/strong> to get this conditional setting in place.<\/p>\n<p>1 &#8211; In the <code>DOCUMENT_ROOT<\/code> Run this command to create a symbolic link of <code>index.php<\/code> as <code>__anything.php<\/code><\/p>\n<pre><code>ln -s index.php __anything.php\n<\/code><\/pre>\n<p>2 &#8211; Put the new code in <code>DOCUMENT_ROOT\/.htaccess<\/code> just below <code>RewriteEngine On<\/code> line. You overall <code>.htaccess<\/code> would look like this:<\/p>\n<pre><code># forward all URLs starting with \/admin\/ to __anything.php\nRewriteRule ^(admin(?:\/.*|))$ __anything.php?\/$1 [L,NC]\n\n# set max_input_vars to 2000 for file __anything.php\n\n    php_value max_input_vars 20000\n\n\n# your regular Codeignitor controller code\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule ^(.*)$ index.php?\/$1 [L]\n<\/code><\/pre>\n<p><strong>PS:<\/strong> I don&#8217;t have CI installed so I cannot really test this with CI but otherwise I tested this and got enhanced <code>max_input_vars<\/code> value.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Okay since you cannot upgrade your Apache to latest versions here is one work-around way to get this conditional setting in place. 1 &#8211; In the DOCUMENT_ROOT Run this command to create a symbolic link of index.php as __anything.php ln -s index.php __anything.php 2 &#8211; Put the new code in DOCUMENT_ROOT\/.htaccess just below RewriteEngine On [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5729","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5729"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5729\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}