forked from zegenie/caspar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
URL_REWRITE
57 lines (42 loc) · 2.36 KB
/
URL_REWRITE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
* URL REWRITING *
Caspar uses URL rewriting to make URLs look more readable.
URL rewriting is what makes it possible to, instead of using URLs such as:
viewissue.php?project_key=projectname&issue_id=123
use URLs such as:
/projectname/issue/123.
It is important that Caspar and your web server is correctly set up
with url rewriting enabled for this to work.
You can read more about setting up URL rewriting, here:
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html (Apache)
http://support.microsoft.com/kb/324000/ (IIS)
For Apache, it is enough that the rewrite module (mod_rewrite) is installed
and enabled, and that the virtual host setup has set
"AllowOverride All"
for the folder where Caspar is located. With this setup, Apache should use
the .htaccess file located inside the public/ folder.
If you for any reason cannot turn on AllowOverride All for that folder, look at
the .htaccess file Caspar bundles (located inside the public/
folder), and copy the necessary lines to your virtual host definition.
* EXAMPLES *
EXAMPLE #1: Caspar is installed in /var/www/caspar, and I want to
set up a virtual host for Caspar.
Apache setup: Set up the virtual host as usual, but point the DocumentRoot
for Caspar to the public/ subfolder inside the main folder.
Make sure the apache virtual host setup has AllowOverride All for the folder
where Caspar is located, and make sure the .htaccess file inside
the public/-folder is accessible to Apache.
Caspar setup: Set the hostname in configuration/caspar.yml to the public
hostname where you plan to access Caspar. With this setup, Caspar will be
accessible at the specified domain.
EXAMPLE #2: Caspar is installed in /var/www/caspar, and I want to
access it as a subfolder of the DocumentRoot, which is /var/www
Apache setup: Make sure the apache host setup has AllowOverride All for the
folder Caspar is located, and make sure the .htaccess file inside the
public/-folder is accessible to Apache. You may want to copy the main
folder content to a folder one level up (extract the main content of
the top public/-folder directly to /var/www), so that
the public/-folder inside the main folder is accessible
as /var/www/caspar.
Caspar setup: Set the hostname in configuration/caspar.yml to the public
hostname where you plan to access Caspar. With this setup, Caspar will be
accessible at either http://hostname/caspar/public/ or http://hostname/caspar/