When the index is in the root directory, you can create a. htaccess file in the root directory where index. php is located and use the following code: RewriteEngineonRewriteCond $1! ^ (Index. php | robots.txt) RewriteRule ^ (. *) $ index. php? $1 [L] If you want to access js, css, and images under the same directory of index. php.
When the index is in the root directory, you can create a. htaccess file in the root directory where index. php is located and use the following code: RewriteEngine onRewriteCond $1! ^ (Index \. php | robots \. txt) RewriteRule ^ (. *) $/index. php? /$1 [L] If you want to access js, css, and images under the same directory of index. php.
When the index is in the root directory, you can create a. htaccess file in the root directory where index. php is located and use the following code:
RewriteEngine onRewriteCond $1 !^(index\.php|robots\.txt)RewriteRule ^(.*)$ /index.php?/$1 [L]
To access js, css, and images in the same directory of index. php, create a. htaccess file in the root directory of index. php and use the following code:
RewriteEngine OnRewriteCond $1 !^(index\.php|images|js|css|robots\.txt)RewriteRule ^(.*)$ /index.php?/$1 [L]
When index. php is not in the root directory, you can create a. htaccess file in the directory where index. php is located and use the following code:
RewriteEngine onRewriteCond $1 !^(index\.php|images|robots\.txt)RewriteRule ^(.*)$ /path_to_app/index.php?/$1 [L]
Note: replace path_to_app with the directory of the file where your index. php is located. Assume that your index. php is placed under the tool sub-folder in the root directory. You can write it like this:
RewriteEngine onRewriteCond $1 !^(index\.php|images|robots\.txt)RewriteRule ^(.*)$ /tool/index.php?/$1 [L]
When using a third-party facebook login, the above method will not be able to access some files of the facebook php sdk. You need to rewrite the. htaccess file to the following form:
RewriteEngine onRewriteRule !\.(js|ico|gif|jpg|png|css|swf|cab|rar|html|pdf|zip|xml|doc|tiff|deb|dmg|exe|tgz|flv|mp4|apk|pkg|mov)$ index.php [NC]
php_value upload_max_filesize 300Mphp_value post_max_size 300Mphp_value emax_file_uploads 300php_value gc_maxlifetime 3600*24*30