Friday, July 19, 2019

How to Install CodeIgniter PHP Framework on Ubuntu 18.04 LTS

<VirtualHost *:80>
 #ServerAdmin admin@yourdomain.com
 #ServerName yourdomain.com
 DocumentRoot /home/boroo/ftp/projects/codeigniter
 <Directory /home/boroo/ftp/projects/codeigniter/>
   Options +FollowSymLinks
   AllowOverride All
   Order allow,deny
   allow from all
 </Directory>
 ErrorLog /var/log/apache2/codeigniter-error_log
 CustomLog /var/log/apache2/codeigniter-access_log common
</VirtualHost>
linux server deer apache garaar tohiruulj baihad rewrite mod ajillahgui tohioldol baival htacces doorhi tohirgood hiigeerei, support ssl+rewrite mod. result: https://domain/subdir/api
#on apache2
#Options Indexes FollowSymLinks Includes ExecCGI
#AllowOverride All
<IfModule mod_rewrite.c>
RewriteEngine on
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>

No comments: