Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Dirk Dankhoff
ISPConfig 3
Commits
790cb86a
Commit
790cb86a
authored
Apr 09, 2012
by
Falko Timme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Make sure no rewrite rules are created if the redirect path is empty.
parent
accfe5ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
server/plugins-available/apache2_plugin.inc.php
server/plugins-available/apache2_plugin.inc.php
+2
-2
server/plugins-available/nginx_plugin.inc.php
server/plugins-available/nginx_plugin.inc.php
+2
-2
No files found.
server/plugins-available/apache2_plugin.inc.php
View file @
790cb86a
...
...
@@ -755,7 +755,7 @@ class apache2_plugin {
// Rewrite rules
$rewrite_rules
=
array
();
if
(
$data
[
'new'
][
'redirect_type'
]
!=
''
)
{
if
(
$data
[
'new'
][
'redirect_type'
]
!=
''
&&
$data
[
'new'
][
'redirect_path'
]
!=
''
)
{
if
(
substr
(
$data
[
'new'
][
'redirect_path'
],
-
1
)
!=
'/'
)
$data
[
'new'
][
'redirect_path'
]
.
=
'/'
;
if
(
substr
(
$data
[
'new'
][
'redirect_path'
],
0
,
8
)
==
'[scheme]'
){
$rewrite_target
=
'http'
.
substr
(
$data
[
'new'
][
'redirect_path'
],
8
);
...
...
@@ -821,7 +821,7 @@ class apache2_plugin {
}
$app
->
log
(
'Add server alias: '
.
$alias
[
'domain'
],
LOGLEVEL_DEBUG
);
// Rewriting
if
(
$alias
[
'redirect_type'
]
!=
''
)
{
if
(
$alias
[
'redirect_type'
]
!=
''
&&
$alias
[
'redirect_path'
]
!=
''
)
{
if
(
substr
(
$alias
[
'redirect_path'
],
-
1
)
!=
'/'
)
$alias
[
'redirect_path'
]
.
=
'/'
;
if
(
substr
(
$alias
[
'redirect_path'
],
0
,
8
)
==
'[scheme]'
){
$rewrite_target
=
'http'
.
substr
(
$alias
[
'redirect_path'
],
8
);
...
...
server/plugins-available/nginx_plugin.inc.php
View file @
790cb86a
...
...
@@ -778,7 +778,7 @@ class nginx_plugin {
// Rewrite rules
$rewrite_rules
=
array
();
if
(
$data
[
'new'
][
'redirect_type'
]
!=
''
)
{
if
(
$data
[
'new'
][
'redirect_type'
]
!=
''
&&
$data
[
'new'
][
'redirect_path'
]
!=
''
)
{
if
(
substr
(
$data
[
'new'
][
'redirect_path'
],
-
1
)
!=
'/'
)
$data
[
'new'
][
'redirect_path'
]
.
=
'/'
;
if
(
substr
(
$data
[
'new'
][
'redirect_path'
],
0
,
8
)
==
'[scheme]'
)
$data
[
'new'
][
'redirect_path'
]
=
'$scheme'
.
substr
(
$data
[
'new'
][
'redirect_path'
],
8
);
/* Disabled path extension
...
...
@@ -834,7 +834,7 @@ class nginx_plugin {
}
$app
->
log
(
'Add server alias: '
.
$alias
[
'domain'
],
LOGLEVEL_DEBUG
);
// Rewriting
if
(
$alias
[
'redirect_type'
]
!=
''
)
{
if
(
$alias
[
'redirect_type'
]
!=
''
&&
$alias
[
'redirect_path'
]
!=
''
)
{
if
(
substr
(
$alias
[
'redirect_path'
],
-
1
)
!=
'/'
)
$alias
[
'redirect_path'
]
.
=
'/'
;
if
(
substr
(
$alias
[
'redirect_path'
],
0
,
8
)
==
'[scheme]'
)
$alias
[
'redirect_path'
]
=
'$scheme'
.
substr
(
$alias
[
'redirect_path'
],
8
);
...
...
Write
Preview
Markdown
is supported
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