-
Notifications
You must be signed in to change notification settings - Fork 0
/
PortalEdit.ascx
270 lines (225 loc) · 23.6 KB
/
PortalEdit.ascx
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<%@ Control Language="C#" AutoEventWireup="true" Explicit="True" Inherits="X3.AdvancedUrlManagement.PortalEdit" CodeBehind="PortalEdit.ascx.cs" %>
<div ng-app="X3AdvancedUrlManagement" ng-cloak>
<div ng-controller="portalEditController">
<div ng-form name="portalEditForm" class="form">
<h1>Portal Settings</h1>
<p>These fields set the URL management rules for the current portal.</p>
<hr />
<div class="form-group">
<label class="control-label" for="url_format">URL Format? <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="You must select 'Advanced' to be able to set the other settings on this page."></span></label>
<select class="form-control" name="url_format" ng-model="portal_settings.url_format">
<option value="advanced">Advanced (recommended)</option>
<option value="humanfriendly">Basic</option>
</select>
</div>
<div ng-show="portal_settings.url_format=='advanced'">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#rewritter" aria-controls="rewritter" role="tab" data-toggle="tab">Rewritter Settings <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="These settings affect how Friendly URLs on hyperlinked objects are generated."></span></a>
</li>
<li role="presentation">
<a href="#redirection" aria-controls="redirection" role="tab" data-toggle="tab">Redirection Settings <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="These settings affect if/when URL requests are redirected."></span></a>
</li>
<li role="presentation">
<a href="#other" aria-controls="other" role="tab" data-toggle="tab">Other Settings</a>
</li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="rewritter">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="page_extension_usage">Show Page Extension? <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="Choose when to display the page extension. <br/>'Always'=Every URL generated by DNN. <br/>'Pages Only'=Only pages (skin objects like Login/Logout will be excluded). <br/>'Never'=Always hide the extension"></span></label>
<select class="form-control" name="page_extension_usage" ng-model="portal_settings.page_extension_usage">
<option value="Never">Never</option>
<option value="AlwaysUse">Always</option>
<option value="PageOnly">Pages Only</option>
</select>
</div>
</div>
<div class="col-sm-6">
<div class="form-group" ng-show="portal_settings.page_extension_usage!='Never'">
<label class="control-label" for="page_extension">Page Extension <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="Specify the extension to use on the end of every page URL. The default value is .aspx. Note: using a custom page extension also requires configuring IIS to handle the custom extension. If you don't know what this means, leave it alone."></span></label>
<input type="text" name-="page_extension" class="form-control" ng-model="portal_settings.page_extension" />
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="force_lower_case">Convert DNN URLs To Lower Case? <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="Enable to convert any URL generated by DNN to all lowercase. ie. Menus, breadcrumbs, module controls, etc."></span></label>
<div>
<switch name="force_lower_case" ng-model="portal_settings.force_lower_case"></switch>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="auto_ascii_convert">Convert Accented Characters? <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="When enabled, any accented (diacritic) characters such as å and è will be converted to their plain-ascii equivalent. Example : å -> a and è -> e."></span></label>
<div>
<switch name="auto_ascii_convert" ng-model="portal_settings.auto_ascii_convert"></switch>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="replace_chars">Replace These Characters <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="Characters in this list will also be replaced with the character selected in 'Replace Spaces With'"></span></label>
<input type="text" name="replace_chars" class="form-control" ng-model="portal_settings.replace_chars" />
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="replace_space_with">With This Character <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="Choose the charcter to use as a replacement for ' '"></span></label>
<select class="form-control" name="replace_space_with" ng-model="portal_settings.replace_space_with">
<option value="-">'-' : e.g. 'About-Us'</option>
<option value="_">'_' : e.g. 'About_Us'</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label" for="replace_char_with_char">Replace Char With Char <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="You can enter pairs of comma separated characters that will replaced one for the other. Separate each pair with a semi-colon"></span></label>
<input type="text" name-="replace_char_with_char" class="form-control" ng-model="portal_settings.replace_char_with_char" />
</div>
<hr />
<a role="button" class="btn btn-default collapsed" data-toggle="collapse" href="#advancedRewrite" aria-expanded="false" aria-controls="collapseExample">Advanced REGEX <span class="glyphicon glyphicon-plus"></span><span class="glyphicon glyphicon-minus"></span></a>
<div class="collapse" id="advancedRewrite">
<hr />
<p><strong>WARNING: If you are not sure what Regex is or how to use it, do not change these values as you could break your website.</strong></p>
<div class="form-group">
<label class="control-label" for="no_friendly_url_regex">Do Not Use Friendly URLs Regex <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="The Do Not Use Friendly URLs regex is used to force certain DNN pages into using a longer URL for the page. This is normally used to generate behaviour for backwards compatibility."></span></label>
<input type="text" name-="no_friendly_url_regex" class="form-control" ng-model="portal_settings.no_friendly_url_regex" />
</div>
<div class="form-group">
<label class="control-label" for="do_not_rewrite_regex">Do Not Rewrite Regex <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="The Do Not Rewrite URL regex stops URL Rewriting from occurring on any URL that matches. Use this value when a URL is being interpreted as a DNN page, but should not be."></span></label>
<input type="text" name-="do_not_rewrite_regex" class="form-control" ng-model="portal_settings.do_not_rewrite_regex" />
</div>
<div class="form-group">
<label class="control-label" for="force_lower_case_regex">Prevent Lowercase Regex <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="The Prevent Lowercase regex stops the automatic conversion to lower case for any matching URLs. Use this pattern to prevent the lowercase conversion of any URLs which need to remain in mixed/upper case. This is frequently used to stop the conversion of URLs where the contents of the URL contain an encoded character or case-sensitive value."></span></label>
<input type="text" name-="force_lower_case_regex" class="form-control" ng-model="portal_settings.force_lower_case_regex" />
</div>
<div class="form-group">
<label class="control-label" for="do_not_include_in_path_regex">Keep In Querystring Regex <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="The Keep in Querystring regex allows the matching of part of the friendly URL Path and ensuring that it stays in the querystring. When a DNN URL of /pagename/key/value is generated, a 'Keep in Querystring Regular Expression' pattern of /key/value will match that part of the path and leave it as part of the querystring for the generated URL; e.g. /pagename?key=value."></span></label>
<input type="text" name-="do_not_include_in_path_regex" class="form-control" ng-model="portal_settings.do_not_include_in_path_regex" />
</div>
<div class="form-group">
<label class="control-label" for="valid_extensionless_urls_regex">URLs With No Extension Regex <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="The URLs With No Extension regex is used to validate URLs that do not refer to a resource on the server, are not DNN pages, but can be requested with no URL extension. URLs matching this regular expression will not be treated as a 404 when a matching DNN page can not be found for the URL."></span></label>
<input type="text" name-="valid_extensionless_urls_regex" class="form-control" ng-model="portal_settings.valid_extensionless_urls_regex" />
</div>
<div class="form-group">
<label class="control-label" for="valid_friendly_url_regex">Valid Friendly URL Regex <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="The Valid Friendly URL regex is used to determine whether the characters that make up a page name or URL segment are valid for forming a friendly URL path. Characters that match the pattern will be removed from page names."></span></label>
<input type="text" name-="valid_friendly_url_regex" class="form-control" ng-model="portal_settings.valid_friendly_url_regex" />
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="redirection">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="redirect_unfriendly">Redirect Unfriendly URLs? <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="Enable to redirect 'unfriendly' URLs"></span></label>
<div>
<switch name="redirect_unfriendly" ng-model="portal_settings.redirect_unfriendly"></switch>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="redirect_wrong_case">Redirect Mixed Case URLs? <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="Enable to redirect mixed case URLs"></span></label>
<div>
<switch name="redirect_wrong_case" ng-model="portal_settings.redirect_wrong_case"></switch>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="redirect_old_profile_url">Redirect Legacy Profile URLs? <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="Enable to redirect legacy profile Urls"></span></label>
<div>
<switch name="redirect_old_profile_url" ng-model="portal_settings.redirect_old_profile_url"></switch>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="ssl_client_redirect">Use Client Side Redirect When Switching To SSL? <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="Enable to force the broswer to redirect on the client side instead of the server side for SSL redirects."></span></label>
<div>
<switch name="ssl_client_redirect" ng-model="portal_settings.ssl_client_redirect"></switch>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label" for="deleted_tab_handling">Behavior For Deleted, Expired, Disabled Pages <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="Select the behavior that should occur when a user browses to a deleted, expired or disabled page."></span></label>
<select class="form-control" name="deleted_tab_handling" ng-model="portal_settings.deleted_tab_handling">
<option value="Do301RedirectToPortalHome">301 Redirect to Site Home Page</option>
<option value="Do404Error">Show 404 Page</option>
</select>
</div>
<hr />
<a role="button" class="btn btn-default collapsed" data-toggle="collapse" href="#advancedRedirection" aria-expanded="false" aria-controls="collapseExample">Advanced REGEX <span class="glyphicon glyphicon-plus"></span><span class="glyphicon glyphicon-minus"></span></a>
<div class="collapse" id="advancedRedirection">
<hr />
<p><strong>WARNING: If you are not sure what Regex is or how to use it, do not change these values as you could break your website.</strong></p>
<div class="form-group">
<label class="control-label" for="do_not_redirect_regex">Do Not Redirect Regex <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="The Do Not Redirect URL regex prevents matching URLs from being redirected in all cases. Use this pattern when a URL is being redirected incorrectly."></span></label>
<input type="text" name-="do_not_redirect_regex" class="form-control" ng-model="portal_settings.do_not_redirect_regex" />
</div>
<div class="form-group">
<label class="control-label" for="do_not_redirect_secure_regex">Do Not Redirect Https URLs Regex <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="The Do Not Redirect Https URLs regex is used to stop unwanted redirects between http and https URLs. It prevents the redirect for any matching URLs, and works both for http->https and https->http redirects."></span></label>
<input type="text" name-="do_not_redirect_secure_regex" class="form-control" ng-model="portal_settings.do_not_redirect_secure_regex" />
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="other">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<label class="control-label" for="check_for_duplicate_urls">Log Duplicate URL Warnings? <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="When checked, any duplicate URLs found in this site will be reported in the event log. The system will choose which of the duplicate URLs to show."></span></label>
<div>
<switch name="check_for_duplicate_urls" ng-model="portal_settings.check_for_duplicate_urls"></switch>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label class="control-label" for="enable_custom_providers">Enable Custom URL Providers? <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="When enabled, the Custom URL Provider functionality of this site is enabled. When unchecked, no custom URL providers will be loaded."></span></label>
<div>
<switch name="enable_custom_providers" ng-model="portal_settings.enable_custom_providers"></switch>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label class="control-label" for="log_cache_messages">Log Cache Messages? <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="Enable this to have DNN log every time the Page Index is cached."></span></label>
<div>
<switch name="log_cache_messages" ng-model="portal_settings.log_cache_messages"></switch>
</div>
</div>
</div>
</div>
<hr />
<a role="button" class="btn btn-default collapsed" data-toggle="collapse" href="#advancedOther" aria-expanded="false" aria-controls="collapseExample">Advanced REGEX <span class="glyphicon glyphicon-plus"></span><span class="glyphicon glyphicon-minus"></span></a>
<div class="collapse" id="advancedOther">
<hr />
<p><strong>WARNING: If you are not sure what Regex is or how to use it, do not change these values as you could break your website.</strong></p>
<div class="form-group">
<label class="control-label" for="ignore_regex">Ignore URLs <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="The Ignore URLs regex is used to stop processing of URLs by the URL Rewriting module. This should be used when the URL in question doesn’t need to be rewritten, redirected or otherwise processed through the URL Rewriter. Examples include images, css files, pdf files, service requests and requests for resources not associated with DNN."></span></label>
<input type="text" name-="ignore_regex" class="form-control" ng-model="portal_settings.ignore_regex" />
</div>
<div class="form-group">
<label class="control-label" for="use_site_urls_regex">Site URLs Only <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-html="true" title="The Site URLs Only regex changes the processing order for matching URLs. When matched, the URLs are evaluated against any of the regular expressions in the siteURLs.config file, without first being checked against the list of friendly URLs for the site. Use this pattern to force processing through the siteURLs.config file for an explicit URL Rewrite or Redirect located within that file."></span></label>
<input type="text" name-="use_site_urls_regex" class="form-control" ng-model="portal_settings.use_site_urls_regex" />
</div>
</div>
</div>
</div>
</div>
<hr />
<button type="button" class="btn btn-primary" ng-click="save()">Save</button>
<button type="button" class="btn btn-link" ng-click="clear()">Clear All</button>
</div>
</div>
</div>