Htaccess File


# GetSimple CMS htaccess ROOT file
# apache 2.4 

# The following require certain allow overrides, if getting 500 error comment them out one by one 
# can be resolved in apache httpd.conf to ensure security alternatives

# override charset
AddDefaultCharset UTF-8

# prevent directory listings
Options -Indexes

# Follow symbolink links, This is required for rewrites on some hosts
Options +FollowSymLinks

# Set the default handler.
DirectoryIndex index.php

# blocks direct access to the XML files - they hold all the data!
# excludes, sitemap, browserconfig, crossdomain
<FilesMatch "(?<!sitemap|browserconfig|crossdomain).xml$">
   Order allow,deny
   Deny from all
  <IfModule !mod_authz_core.c>
    Deny from all
  <IfModule mod_access_compat.c>
    Deny from all
  <IfModule mod_authz_core.c>
    <IfModule !mod_access_compat.c>
      Require all denied

# handle rewrites for fancy urls
<IfModule mod_rewrite.c>

  # Tell PHP that the mod_rewrite module is ENABLED.

  RewriteEngine on

  # Usually RewriteBase is just '/', but 
  # replace it with your subdirectory path
  RewriteBase **REPLACE**

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
Exit mobile version