Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

htacess rule to exclude controller folder from a existing rule

$
0
0
Hi guys

I have htaccess rule to redirect my full website to https, i would like to exclude controllers/api folder from this redirection and keep it with http instead https

1. here is the link calling folder controllers/api folder
http://apphotel.ch/app_fe_dev/api/profile?client=31&language=1

2. here below is my current htacess content

# File modified on Wed Sep 23 23:12:19 2015 by server
# For security reasons, mod_php is not used on this server. Use a php.ini file for php directives
# php_value memory_limit "512M" 
# For security reasons, mod_php is not used on this server. Use a php.ini file for php directives
# php_value upload_max_filesize "100M" 
# For security reasons, mod_php is not used on this server. Use a php.ini file for php directives
# php_value post_max_size "100M" 

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/api
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]]

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} ^/(?!source)
  RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
 
<IfModule !mod_rewrite.c>
  # If we don't have mod_rewrite installed, all 404's
  # can be sent to index.php, and everything works as normal.
  # Submitted by: ElliotHaughin
   ErrorDocument 404 /index.php
</IfModule>


3. and here is the folder structure 

https://www.dropbox.com/s/6z260s4f5c2qte...3.png?dl=0

thank you very much for your help

cheers 
Antony

.png   Capture d'écran 2018-03-12 19.44.03.png (Size: 19.56 KB / Downloads: 1)

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>