Codeigniter https htaccess
.htaccess file is a configuration file used to override the main server configuration. .htaccess file placed in a directory and the configuration is applied to that particular directory and all the subdirectories. The most usage of .htaccess file is Rewriting URLs, Blocking, SSL, Customized error responses, Directory listing, Cache-Control, etc.
Code
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
#RewriteEngine on
#RewriteCond %{HTTP_HOST} ^dentistseoservices.net [NC]
#RewriteRule ^(.*)$ http://www.dentistseoservices.net/$1 [L,R=301,NC]
RewriteEngine on
RedirectMatch ^/(.*?)/$ /$1
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) https://www.dentistseoservices.net%{REQUEST_URI} [R=301,L]
# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php5_module>
php_flag asp_tags Off
php_flag display_errors Off
php_value max_execution_time 7200
php_value max_input_time 6000
php_value max_input_vars 7200
php_value memory_limit 512M
php_value post_max_size 512M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/tmp"
php_value upload_max_filesize 512M
php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php56” package as the default “PHP” programming language.
<IfModule mime_module>
AddType application/x-httpd-ea-php56 .php .php5 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
Leave a Reply