]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - htaccess.sample
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / htaccess.sample
1 ### GNU social "fancy URL" setup
2 #
3 #   Change the "RewriteBase" in the new .htaccess file to be the URL path
4 #       to your GNU Social installation on your server. Typically this will
5 #       be the path to your GNU Social directory relative to your Web root.
6 #       If you are installing it in the root directory, leave it as '/'.
7 #
8 #   If it doesn't work, double-check that AllowOverride for the GNU Social
9 #       directory is 'All' in your Apache configuration file. This can be
10 #       * /etc/apache2/apache2.conf (generic)
11 #       * /etc/apache2/sites-available/default(on Debian and Ubuntu)
12 #       * ...many other variations depending on distribution...
13 #
14 #   See the Apache documentation for .htaccess files for more details:
15 #       https://httpd.apache.org/docs/2.4/howto/htaccess.html
16 #
17 #   Also, check that mod_rewrite is installed and enabled:
18 #       https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html
19
20
21 <IfModule mod_rewrite.c>
22   RewriteEngine On
23
24   # NOTE: change this to your actual GNU social base URL path,
25   # minus the domain part:
26   #
27   #   https://social.example.com/        => /
28   #   https://example.com/social/ => /social/
29   #
30   RewriteBase /
31   #RewriteBase /mublog/
32
33   ## Uncomment these if having trouble with API authentication
34   ## when PHP is running in CGI or FastCGI mode.
35   #
36   #RewriteCond %{HTTP:Authorization} ^(.*)
37   #RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
38
39   RewriteCond %{REQUEST_FILENAME} !-f
40   RewriteCond %{REQUEST_FILENAME} !-d
41   RewriteRule (.*) index.php?p=$1 [L,QSA]
42
43   ## You can also use PATHINFO by using this RewriteRule instead:
44   # RewriteRule (.*) index.php/$1 [L,QSA]
45 </IfModule>
46
47 <FilesMatch "\.(ini)">
48   # For mod_access_compat in Apache <2.4
49   #Order allow,deny
50
51   # Use this instead for Apache >2.4 (mod_authz_host)
52   # Require all denied
53 </FilesMatch>