Htaccess File

ralivue/fabriqframework/master/.htaccess

REQUEST_FILENAME, REQUEST_URI
#
# .htaccess file for Fabriq Framework
#

# We need protect files and directories
<FilesMatch ".(app|config|core|libs|modules|sites|inc.php|tpl.php|tmpl.php|view.php|model.php|controller.php)$|^(..*)$">
  Order allow,deny
  Deny from all
</FilesMatch>

# Allow sym links to be followed
Options +FollowSymLinks

# Don't show directory listing for URLs that map to a directory
Options -Indexes

# Make sure Fabriq handles errors.
ErrorDocument 403 /index.php?q=403
ErrorDocument 404 /index.php?q=404
ErrorDocument 500 /index.php?q=500

# Set up the default handler files
DirectoryIndex index.php index.html index.htm

<IfModule mod_rewrite.c>
  RewriteEngine   On

  # Rewrite rule to make sure that files located in public are served properly
  # This was kept to make sure images linked to relatively are served right
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} (.*)(/public/)(.*)$
  RewriteRule ^(.*)(public/)(.*)$ $2$3

  # Rewrite for clean URLs
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
Exit mobile version