MMCT TEAM
Server IP : 103.191.208.50  /  Your IP : 216.73.216.53
Web Server : LiteSpeed
System : Linux orion.herosite.pro 4.18.0-553.53.1.lve.el8.x86_64 #1 SMP Wed May 28 17:01:02 UTC 2025 x86_64
User : celkcksm ( 1031)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, popen, exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home/celkcksm/ecampus.ncriptech.com/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/celkcksm/ecampus.ncriptech.com/.htaccess
<IfModule mod_rewrite.c>
    RewriteEngine On
    
    # Remove index.php from URLs
    # Wildcard subdomain routing
    # Check if request is coming from a subdomain
    RewriteCond %{HTTP_HOST} ^([a-zA-Z0-9-]+)\.firstkliq\.com$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
    
    # Force main domain to use index.php
    RewriteCond %{HTTP_HOST} ^firstkliq\.com$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Prevent access to dot files
    RewriteCond %{SCRIPT_FILENAME} -d [OR]
    RewriteCond %{SCRIPT_FILENAME} -f
    RewriteRule "(^|/)\." - [F]

    # Block access to sensitive folders/files
    RedirectMatch 403 ^/application.*
    RedirectMatch 403 ^/system.*
    RedirectMatch 403 ^/vendor.*
    RedirectMatch 403 ^/.git.*

    # Prevent directory listings
    Options All -Indexes
</IfModule>

# Set default character set
AddDefaultCharset UTF-8

# Force https
#<IfModule mod_rewrite.c>
#    RewriteEngine On
#    RewriteCond %{HTTPS} off
#    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#</IfModule>

# Handle errors
ErrorDocument 404 /index.php
ErrorDocument 403 /index.php

# Configure PHP settings (if allowed)
<IfModule mod_php.c>
    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 300
    php_value max_input_time 300
</IfModule>

# Enable CORS (if needed)
#<IfModule mod_headers.c>
#    Header set Access-Control-Allow-Origin "*"
#</IfModule>

# Caching headers (optional)
#<IfModule mod_expires.c>
#    ExpiresActive On
#    ExpiresByType image/jpg "access 1 year"
#    ExpiresByType image/jpeg "access 1 year"
#    ExpiresByType image/gif "access 1 year"
#    ExpiresByType image/png "access 1 year"
#    ExpiresByType text/css "access 1 month"
#    ExpiresByType text/html "access 1 month"
#    ExpiresByType application/pdf "access 1 month"
#    ExpiresByType text/x-javascript "access 1 month"
#    ExpiresByType application/x-shockwave-flash "access 1 month"
#    ExpiresByType image/x-icon "access 1 year"
#    ExpiresDefault "access 1 month"
#</IfModule>

# Compress text files
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
</IfModule>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php74___lsphp .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

MMCT - 2023