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 #43432

Open
wants to merge 1 commit into
base: 5.2-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
SEF: Add "Strict Routing" option
  • Loading branch information
Hackwar committed May 6, 2024
commit aaf16845b2ca05f5c13f65bc53b4525d0e0d0876
2 changes: 2 additions & 0 deletions administrator/language/en-GB/plg_system_sef.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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="Strict Routing will 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"
Expand Down
13 changes: 13 additions & 0 deletions plugins/system/sef/sef.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down