%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/softaculous/phpwcms/
Upload File :
Create Path :
Current File : //var/softaculous/phpwcms/.htaccess

# Avoid accessing typical project specific IDE settings
RedirectMatch 404 /\.git
RedirectMatch 404 /\.idea
RedirectMatch 404 /\.nova
RedirectMatch 404 /\.vscode
RedirectMatch 404 /\.vs

# PHP: These settings are recommend - check phpinfo() before try these
#   register_globals ON
#   php_flag magic_quotes_gpc Off
#   php_flag magic_quotes_runtime Off
#   php_flag register_globals Off

#Sometimes necessary to add special types
#   AddType application/x-javascript .js
#   AddType text/css .css
#   AddType video/ogg .ogv
#   AddType video/ogg .ogg
#   AddType video/mp4 .mp4
#   AddType video/x-m4v .m4v
#   AddType video/webm .webm
#   AddType image/svg+xml .svg
#   AddType application/font-woff .woff
#   AddType application/vnd.ms-fontobject .eot
#   AddType application/x-font-ttf .ttf
#   AddType application/x-font-opentype .otf

# Options:
#   Options +FollowSymlinks
#   AcceptPathInfo On

# All 404 error should link to phpwcms then
# it is easy to define internal routing/redirection
#   ErrorDocument 404 /index.php?r404
# Installed in Subfolder www.example.com/subfolder/
#   ErrorDocument 404 /subfolder/index.php?r404

# Rewrite:
<IfModule mod_rewrite.c>

    RewriteEngine On

    # Force everything to www. and keep or force SSL status too
    #RewriteCond %{HTTP_HOST} !^$
    #RewriteCond %{HTTPS} off [OR]
    #RewriteCond %{HTTP_HOST} !^www\. [NC]
    #RewriteCond %{HTTPS}s ^on(s)|
    #RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    #RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    # Some more simple redirect example
    #RewriteCond %{HTTP_HOST} ^example.com [OR]
    #RewriteCond %{HTTP_HOST} ^example-two.com [OR]
    #RewriteCond %{HTTP_HOST} ^www.example-two.de [OR]
    #RewriteCond %{SERVER_PORT} 80
    #RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

    DirectoryIndex index.html index.php index.phtml

    # Redirect /en and /en/ to english home
    #RewriteRule ^(en|de)(/{0,1})$ ./index.php?$1/index [L,QSA]

    # Use RewriteBase - always start in Document Root
    #RewriteBase /
    # If installed in a subfolder
    RewriteBase [[relativeurl]]/

    # Resized image /img/cmsimage.php/… -> /im/…
    RewriteRule ^im\/(.+?)$ ./img/cmsimage.php?$1 [L]

    # File download /dl/… -> /download.php?…
    RewriteRule ^dl\/([a-fA-Z0-9]+)\/(.*?)$ ./download.php?f=$1&%{QUERY_STRING} [L]

    # Stop rewrite processing, if we are in any known directory
    # NOTE: Add your additional local storages here
    RewriteRule ^(?:template/|content/|picture/|uploads/|include/|filearchive/|img/) - [L]

    # Ignore all files and folders that exists
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]

    # In case of config setting `$phpwcms['rewrite_ext']='.html'` -> /alias.html (Default)
    RewriteRule ^(.+)\.[p]{0,1}html$ ./index.php?$1&%{QUERY_STRING} [L]
    RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.[p]{0,1}html$ ./index.php?id=$1,$2,$3,$4,$5,$6&%{QUERY_STRING} [L]

    # Rewrite anything else and link it against phpwcms
    # Check redirect settings under admin in the backend
    RewriteRule ^(.+)/?$ ./index.php?$1&%{QUERY_STRING}

</IfModule>

Zerion Mini Shell 1.0