Question: How To Force Ssl With Htaccess

How To Force Ssl With Htaccess

My .htacces file: ```php <IfModule mod_rewrite.c> RewriteEngine On # RewriteBase /forums/ RewriteCond $1 !^(index\.php|assets|install|update) RewriteCond %{REQUEST_FILENAME} !-f RewriteCon

ZS

Zoltán Szeles

Asked
My .htacces file:

```php
<IfModule mod_rewrite.c>

RewriteEngine On
# RewriteBase /forums/
RewriteCond $1 !^(index\.php|assets|install|update)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# For godady Shared Hosting Server uncomment the line below
# RewriteRule ^(.*)$ index.php?/$1 [L]

# Please comment this if you have uncommented the above
RewriteRule ^(.*)$ index.php?/$1 [NC,L,QSA]

</IfModule>
```

What do i need to modify on my code?
  • ZS

    Zoltán Szeles

    Answered
    How can I redirect http:// to https:// ?
  • MS

    Mian Saleem

    Answered
    Hello,

    If you have enabled ssl on server., you can change the `base_url` in `app/config/config.php` It should start with `https://`

    Thank you
  • Login to Reply