Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
df73824d
Commit
df73824d
authored
Jul 03, 2007
by
tbrehm
Browse files
Fixed a bug in apache rewrite rules.
parent
a3576476
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/conf/vhost.conf.master
View file @
df73824d
...
...
@@ -3,9 +3,10 @@
<VirtualHost <tmpl_var name='ip_address'>:80>
DocumentRoot <tmpl_var name='web_document_root'>
ServerName <tmpl_var name='domain'>
<tmpl_if name='alias'>
ServerAlias <tmpl_var name='alias'>
RewriteEngine on
</tmpl_if>
<tmpl_if name='cgi'>
# cgi enabled
ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/
...
...
@@ -18,7 +19,7 @@
AddOutputFilter INCLUDES .shtml
</tmpl_if>
<tmpl_if name='suexec'>
# suexec enabled
# suexec enabled
SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
</tmpl_if>
<tmpl_if name='php' op='==' value='mod'>
...
...
@@ -37,10 +38,12 @@
AddType application/x-httpd-php .php .php3 .php4 .php5
</tmpl_if>
<tmpl_if name="rewrite_enabled">
RewriteEngine on
<tmpl_loop name="redirects">
RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC]
RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>]
</tmpl_loop>
</tmpl_if>
</VirtualHost>
\ No newline at end of file
server/plugins-enabled/apache2_plugin.inc.php
View file @
df73824d
...
...
@@ -165,6 +165,11 @@ class apache2_plugin {
}
}
$tpl
->
setVar
(
'alias'
,
trim
(
$server_alias
));
if
(
count
(
$rewrite_rules
)
>
0
)
{
$tpl
->
setVar
(
'rewrite_enabled'
,
1
);
}
else
{
$tpl
->
setVar
(
'rewrite_enabled'
,
0
);
}
$tpl
->
setLoop
(
'redirects'
,
$rewrite_rules
);
$vhost_file
=
escapeshellcmd
(
$web_config
[
"vhost_conf_dir"
]
.
'/'
.
$data
[
"new"
][
"domain"
]
.
'.vhost'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment