GitHost.io will be shut down on June 1, 2019. At that point this instance will be unreachable and all data will be irrevocably deleted. More details at https://about.gitlab.com/gitlab-hosted/#githost-is-shutting-down-on-june-1st-2019

htaccess.sample 1.8 KB
Newer Older
mmn's avatar
mmn committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
### GNU social "fancy URL" setup
#
#   Change the "RewriteBase" in the new .htaccess file to be the URL path
#       to your GNU Social installation on your server. Typically this will
#       be the path to your GNU Social directory relative to your Web root.
#       If you are installing it in the root directory, leave it as '/'.
#
#   If it doesn't work, double-check that AllowOverride for the GNU Social
#       directory is 'All' in your Apache configuration file. This can be
#       * /etc/apache2/apache2.conf (generic)
#       * /etc/apache2/sites-available/default(on Debian and Ubuntu)
#       * ...many other variations depending on distribution...
#
#   See the Apache documentation for .htaccess files for more details:
#       https://httpd.apache.org/docs/2.4/howto/htaccess.html
#
#   Also, check that mod_rewrite is installed and enabled:
#       https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html


21 22
<IfModule mod_rewrite.c>
  RewriteEngine On
23

mmn's avatar
mmn committed
24
  # NOTE: change this to your actual GNU social base URL path,
Brion Vibber's avatar
Brion Vibber committed
25 26
  # minus the domain part:
  #
mmn's avatar
mmn committed
27 28
  #   https://social.example.com/        => /
  #   https://example.com/social/ => /social/
Brion Vibber's avatar
Brion Vibber committed
29
  #
30 31
  RewriteBase /
  #RewriteBase /mublog/
32

33 34
  ## Uncomment these if having trouble with API authentication
  ## when PHP is running in CGI or FastCGI mode.
Brion Vibber's avatar
Brion Vibber committed
35
  #
36 37 38
  #RewriteCond %{HTTP:Authorization} ^(.*)
  #RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]

39 40 41
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule (.*) index.php?p=$1 [L,QSA]
42 43 44

  ## You can also use PATHINFO by using this RewriteRule instead:
  # RewriteRule (.*) index.php/$1 [L,QSA]
45
</IfModule>
46

47
<FilesMatch "\.(ini)">
mmn's avatar
mmn committed
48 49 50 51 52 53 54
    <IfVersion < 2.3>
        Order allow,deny
        Deny from all
    </IfVersion>
    <IfVersion >= 2.3>
        Require all denied
    </IfVersion>
55
</FilesMatch>