Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] SEF: Add "Strict Routing" option #3242

Closed
jgerman-bot opened this issue Aug 16, 2024 · 0 comments · Fixed by #3245
Closed

[5.2] SEF: Add "Strict Routing" option #3242

jgerman-bot opened this issue Aug 16, 2024 · 0 comments · Fixed by #3245

Comments

@jgerman-bot
Copy link

New language relevant PR in upstream repo: joomla/joomla-cms#43432 Here are the upstream changes:

Click to expand the diff!
diff --git a/administrator/language/en-GB/plg_system_sef.ini b/administrator/language/en-GB/plg_system_sef.ini
index 6540197978992..085b81a0a0ce4 100644
--- a/administrator/language/en-GB/plg_system_sef.ini
+++ b/administrator/language/en-GB/plg_system_sef.ini
@@ -7,6 +7,8 @@ PLG_SEF_DOMAIN_DESCRIPTION="If your site can be accessed through more than one d
 PLG_SEF_DOMAIN_LABEL="Site Domain"
 PLG_SEF_INDEXPHP_DESCRIPTION="This option enables a stricter handling of 'index.php' in URLs when 'Use URL Rewriting' is enabled in Global Configuration. It will remove 'index.php' if a URL still contains it and redirect incoming requests with 'index.php' to the version without the 'index.php'."
 PLG_SEF_INDEXPHP_LABEL="Strict handling of index.php"
+PLG_SEF_STRICTROUTING_DESCRIPTION="Prevent the router from accepting a lot of URLs which are deemed as duplicates and will automatically redirect to the correct URL with a 301."
+PLG_SEF_STRICTROUTING_LABEL="Strict Routing"
 PLG_SEF_TRAILINGSLASH_DESCRIPTION="Force Joomla to only use URLs with or without trailing slash. When set, this will force the right URL with redirects and is only applied when 'Add suffix to URL' is disabled."
 PLG_SEF_TRAILINGSLASH_LABEL="Trailing slash for URLs"
 PLG_SEF_TRAILINGSLASH_OPTION_NONE="No change"
diff --git a/plugins/system/sef/sef.xml b/plugins/system/sef/sef.xml
index edecff778b910..467cac9fe0166 100644
--- a/plugins/system/sef/sef.xml
+++ b/plugins/system/sef/sef.xml
@@ -56,6 +56,19 @@
 					<option value="0">PLG_SEF_TRAILINGSLASH_OPTION_NO_SLASH</option>
 					<option value="1">PLG_SEF_TRAILINGSLASH_OPTION_SLASH</option>
 				</field>
+
+				<field
+					name="strictrouting"
+					type="radio"
+					label="PLG_SEF_STRICTROUTING_LABEL"
+					description="PLG_SEF_STRICTROUTING_DESCRIPTION"
+					layout="joomla.form.field.radio.switcher"
+					default="0"
+					filter="boolean"
+				>
+					<option value="0">JNO</option>
+					<option value="1">JYES</option>
+				</field>
 			</fieldset>
 		</fields>
 	</config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants