Added setting to omit index.php from the URL
authorMarcel Werk <burntime@woltlab.com>
Tue, 3 Jun 2014 17:55:02 +0000 (19:55 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 3 Jun 2014 17:55:02 +0000 (19:55 +0200)
com.woltlab.wcf/option.xml
wcfsetup/install/files/lib/system/request/Route.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 1f8eee1435b859b706c74c7cc89297a9030f6660..857869f2e46ca8c3478eeb3a4fb72504a45d98ed 100644 (file)
@@ -30,6 +30,9 @@
                                <category name="general.page">
                                        <parent>general</parent>
                                </category>
+                                       <category name="general.page.seo">
+                                               <parent>general.page</parent>
+                                       </category>
                                <category name="general.offline">
                                        <parent>general</parent>
                                </category>
                                <categoryname>general.page</categoryname>
                                <optiontype>textarea</optiontype>
                        </option>
+                       
+                       <option name="url_omit_index_php">
+                               <categoryname>general.page.seo</categoryname>
+                               <optiontype>boolean</optiontype>
+                               <defaultvalue>0</defaultvalue>
+                       </option>
                        <option name="url_title_component_replacement">
-                               <categoryname>general.page</categoryname>
+                               <categoryname>general.page.seo</categoryname>
                                <optiontype>textarea</optiontype>
                        </option>
                        <!-- /general.page -->
index 2d9b420f53b3195f98eb9debf1777200c053ddd0..fc765e958c4b1d2a745b8cc04dc31bd9d5335191 100644 (file)
@@ -301,7 +301,7 @@ class Route {
                        }
                }
                
-               if (!empty($link)) {
+               if (!empty($link) && ($this->isACP() || !URL_OMIT_INDEX_PHP)) {
                        $link = 'index.php/' . $link;
                }
                
index d594c2f8fca4e6b142388267478dbf53152e6c90..565b1073a3fa924f439bcbba3a8406685dc5f928 100644 (file)
                <item name="wcf.acp.option.category.general.mail.general"><![CDATA[Allgemein]]></item>
                <item name="wcf.acp.option.category.general.mail.send"><![CDATA[Versand]]></item>
                <item name="wcf.acp.option.category.general.page"><![CDATA[Seite]]></item>
+               <item name="wcf.acp.option.category.general.page.seo"><![CDATA[Suchmaschinenoptimierung (SEO)]]></item>
                <item name="wcf.acp.option.category.message"><![CDATA[Nachrichten]]></item>
                <item name="wcf.acp.option.category.message.general"><![CDATA[Allgemein]]></item>
                <item name="wcf.acp.option.category.module"><![CDATA[Module]]></item>
@@ -930,6 +931,8 @@ GmbH=Gesellschaft mit beschränkter Haftung]]></item>
                <item name="wcf.acp.option.module_privacy_policy_page"><![CDATA[Datenschutzerklärung aktivieren]]></item>
                <item name="wcf.acp.option.module_cookie_policy_page"><![CDATA[Erklärung zum „Einsatz von Cookies“ aktivieren]]></item>
                <item name="wcf.acp.option.module_cookie_policy_page.description"><![CDATA[Weist Besucher beim ersten Aufruf der Seite gemäß EU-Richtlinie 2009/136/EG auf den Einsatz von Cookies hin.]]></item>
+               <item name="wcf.acp.option.url_omit_index_php"><![CDATA[„index.php“ aus URLs entfernen]]></item>
+               <item name="wcf.acp.option.url_omit_index_php.description"><![CDATA[TODO]]></item>
        </category>
        
        <category name="wcf.acp.package">
index 7c5e5bb07efeb8c91a1c2b0e814e110bed27dc80..94ce2a92f76a02e3783885f6338e658c3db9e659 100644 (file)
@@ -611,6 +611,7 @@ Examples for medium ID detection:
                <item name="wcf.acp.option.category.general.mail.general"><![CDATA[General]]></item>
                <item name="wcf.acp.option.category.general.mail.send"><![CDATA[Sending]]></item>
                <item name="wcf.acp.option.category.general.page"><![CDATA[Page]]></item>
+               <item name="wcf.acp.option.category.general.page.seo"><![CDATA[TODO: Suchmaschinenoptimierung (SEO)]]></item>
                <item name="wcf.acp.option.category.message"><![CDATA[Messages]]></item>
                <item name="wcf.acp.option.category.message.general"><![CDATA[General]]></item>
                <item name="wcf.acp.option.category.module"><![CDATA[Module]]></item>
@@ -901,6 +902,8 @@ GmbH=Gesellschaft mit beschränkter Haftung]]></item>
                <item name="wcf.acp.option.module_privacy_policy_page"><![CDATA[TODO: Enable Privacy Policy page]]></item>
                <item name="wcf.acp.option.module_cookie_policy_page"><![CDATA[TODO: Erklärung zum „Einsatz von Cookies“ aktivieren]]></item>
                <item name="wcf.acp.option.module_cookie_policy_page.description"><![CDATA[TODO: Weist Besucher beim ersten Aufruf der Seite gemäß EU-Richtlinie 2009/136/EG auf den Einsatz von Cookies hin.]]></item>
+               <item name="wcf.acp.option.url_omit_index_php"><![CDATA[TODO: „index.php“ aus URLs entfernen]]></item>
+               <item name="wcf.acp.option.url_omit_index_php.description"><![CDATA[TODO]]></item>
        </category>
        
        <category name="wcf.acp.package">