Real Url

  • lucas lucas
    Padawan
    0 x
    40 Beiträge
    0 Hilfreiche Beiträge
    18. 08. 2008, 10:38

    Hallo Leute!

    Ich verwende die Extension RealUrl 1.1.4 und soweit funktioniert auch alles.
    Aber noch 2 kleine Problemchen haben ich und zwar:

    1. möchte ich nicht dass am ende der url &L=1 steht sondern nach der TLD/de/...

    2. Können meine anderen Extensions keine LangUid lesen (glaube das hängt mit dem ersten Problem zusammen).

    Kann mir jemand weiterhelfen?

    danke Lucas


  • 1
  • einpraegsam.net einpraegs...
    MacGyver
    0 x
    9340 Beiträge
    80 Hilfreiche Beiträge
    18. 08. 2008, 10:50

    1 und 2 sind das gleiche Problem - wie ist deine realurlconf?

    in2code.de - Wir leben TYPO3
    - Möchtest du TYPO3 komplett verstehen? Eigene Erweiterungen erstellen? Bei uns gibt es auch Schulungen https://www.in2code.de/produkte/typo3-schulungen/
    - Die Arbeit mit TYPO3 macht dir Spaß? Du stehst auf Berge? Komm zu uns! https://www.in2code.de/agentur/karriere/

  • lucas lucas
    Padawan
    0 x
    40 Beiträge
    0 Hilfreiche Beiträge
    18. 08. 2008, 13:20

    hi!

    ich arbeite nur mit der .htaccess und dort steht

    [HTML]#####
    #
    # Example .htaccess file
    #
    # This file contains a collection of almost everything you will need
    # for optimising TYPO3:
    #
    # - mod_rewrite (used for SimulateStaticDocuments, RealUrl, etc.)
    # - PHP optimisation
    #
    # If you want to use it, you'll need to rename this file to '.htaccess'.
    # (To make this work you will need to adjust the 'AllowOverride'
    # directive in your Apache configuration file.)
    #
    # IMPORTANT: You may need to change this file depending on your TYPO3
    # installation!
    #
    # You should change every occurance of TYPO3root/ to the location where you
    # have your website in. For example:
    # If you have your website located at http://mysite.com/
    # then your TYPO3root/ is just empty (remove 'TYPO3root/')
    # If you have your website located at http://mysite.com/some/path/
    # then your TYPO3root/ is some/path/ (search and replace)
    #
    # If you have problems with this file, try using the minimal
    # mod_rewrite.htaccess which is located in the typo3_src/misc/
    # directory of this installation.
    #
    # You can also use this configuration in your httpd.conf, but you'll have
    # to modify some lines, see the comments (search for 'httpd.conf')
    #
    # Using rewriting in your httpd.conf is much faster, btw.
    #
    # Questions about this file go to the matching Install mailing list,
    # see http://typo3.org/documentation/mailing-lists/
    #
    ####

    ### Begin: Rewrite stuff ###

    # Enable URL rewriting
    RewriteEngine On

    # To assist in debugging rewriting, you could use these lines
    # DON'T enable it for production!
    # This will only work in httpd.conf, not in .htaccess files
    #RewriteLog /var/log/apache/rewrite.log
    #RewriteLogLevel 9

    # If you use the RealUrl extension, then you'll have to enable the next line.
    # You will have to change this path if your TYPO3 installation is located
    # in a subdirectory of the website root.
    #
    # If you place this in httpd.conf, you cannot use this directive in any case!
    #RewriteBase /

    # Stop rewrite processing if we are in the typo3/ directory
    # For httpd.conf, use this line instead of the next one:
    # RewriteRule ^/TYPO3root/(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]

    # Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
    # and stop the rewrite processing
    # For httpd.conf, use this line instead of the next one:
    # RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]RewriteRule ^typo3$ typo3/index_re.php [L]

    # If the file/symlink/directory does not exist => Redirect to index.php
    # Important note: If you copy/paste this into httpd.conf instead
    # of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
    # '%{REQUEST_FILENAME}' part.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

    # Main URL rewriting.

    # If you use Windows and SimulateStaticDocuments do not work, try adding a
    # slash (/) right before 'index.php' below.

    # The example shows how to rewrite only *.html and *.pdf files to index.php
    # This may be helpful when using an extension that can generate PDF files
    # on the fly.
    # Example: RewriteRule .*\.(html|pdf)$ index.php [L]

    # For httpd.conf, use this line instead of the next one that has no '#':
    # RewriteRule .* /TYPO3root/index.php [L]

    # For use with the RealUrl extension, you might need to remove the
    # RewriteBase directive somewhere above and use this line instead of the
    # next one:
    # RewriteRule .* /index.php [L]

    RewriteRule .* index.php [L]

    ### End: Rewrite stuff ###

    ### Begin: PHP optimisation ###

    # All features below are left to the default if you don't change this.
    # Simply remove the comment marks if you want to use some/all of these
    # settings

    # The PHP developers recommend disabling this feature. Do that.
    # It's deprecated and is likely to be unsupported in future versions of PHP.
    #php_flag allow_call_time_pass_reference off

    # TYPO3 works fine with register_globals turned off.
    # This is highly recommended!
    #php_flag register_globals off

    # PHP may not declare the argv & argc variables (that would contain the GET
    # information).
    # TYPO3 doesn't need this, so just turn it off.
    #php_flag register_argc_argv off

    # Magic quotes for runtime-generated data (data from SQL, exec(), etc.)
    #php_flag magic_quotes_gpc off

    # Order in which PHP registers GET, POST, Cookie and Built-in variables
    #php_value variables_order GPCS

    ### End: PHP optimisation ###

    ### Begin: Miscellaneous ###

    # Make sure that directory listings are disabled
    #Options -Indexes

    # There is a problem with Internet Explorer and mod_gzip on Apache servers.
    # For more information, see
    # http://typo3.org/documentation/document-library/rtehtmlarea/Tutorial-79/
    #mod_gzip_item_exclude file \.css$
    #mod_gzip_item_exclude file \.png$
    #mod_gzip_item_exclude file \.gif$
    #mod_gzip_item_exclude file \.jpg$
    #mod_gzip_item_exclude file \.jpeg$
    #mod_gzip_item_exclude file \.js$

    ### End: Miscellaneous ###

    # Add your own rules here
    # ...
    [/HTML]

    weiters habe ich im setup nur config.tx_realurl_enable = 1 stehen.

    localconf steht:

    [HTML]$TYPO3_CONF_VARS['EXT']['extConf']['realurl'] = 'a:3:{s:10:"configFile";s:26:"typo3conf/realurl_conf.php";s:14:"enableAutoConf";s:1:"1";s:14:"autoConfFormat";s:1:"0";}'; // Modified or inserted by TYPO3 Extension Manager.
    [/HTML]

  • starkheim starkheim
    Padawan
    0 x
    44 Beiträge
    0 Hilfreiche Beiträge
    19. 08. 2008, 17:19

    Hallo
    könnte es sein, dass Du sonst noch eine zusätzliche Extension verwendest, die das Realurl steuert.
    Bei mir sieht dass ein bischen länger aus

    1. $TYPO3_CONF_VARS['FE']['addRootLineFields'].= ',tx_realurl_pathsegment';
    2.  
    3. // Konfiguration des RealUrl-Pfades
    4. $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
    5. '_DEFAULT' => array(
    6. 'init' => array(
    7. 'enableCHashCache' => 1,
    8. 'appendMissingSlash' => 'ifNotFile',
    9. 'enableUrlDecodeCache' => 1,
    10. 'enableUrlEncodeCache' => 1,
    11. 'postVarSet_failureMode' => 'redirect_goodUpperDir',
    12. 'emptyUrlReturnValue' => 1,
    13. ),
    14. 'redirects' => array(
    15. ),
    16. 'preVars' => array(
    17. 'GETvar' => 'no_cache',
    18. 'valueMap' => array(
    19. 'nc' => 1,
    20. ),
    21. 'noMatch' => 'bypass',
    22. ),
    23. 'GETvar' => 'L',
    24. 'valueMap' => array(
    25. 'de' => '0',
    26. 'en' => '1'
    27. ),
    28. 'valueDescription' => array(
    29. 'de' => 'Deutsch',
    30. ),
    31. 'valueDefault' => 'de',
    32. ),
    33. ),
    34. 'pagePath' => array(
    35. 'type' => 'user',
    36. 'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
    37. 'spaceCharacter' => '-',
    38. 'languageGetVar' => 'L',
    39. 'expireDays' => 30,
    40. 'segTitleFieldList' => 'tx_realurl_pathsegment,alias,nav_title,title',
    41. 'rootpage_id' => 1,
    42. 'excludePageIds' => ''
    43. ),
    44. 'fixedPostVars' => array(),
    45. 'postVarSets' => array(),
    46. 'fileName' => array(
    47. 'defaultToHTMLsuffixOnPrev' => '.html',
    48. 'index' => array(
    49. 'page.html' => array(
    50. 'keyValues' => array (
    51. 'type' => 1,
    52. ),
    53. ),
    54. 'print.html' => array (
    55. 'keyValues' => array (
    56. 'type' => 98
    57. )
    58. ),
    59. '_DEFAULT' => array (
    60. 'keyValues' => array ()
    61. )
    62. ),
    63. ),
    64. ),
    65. );

    So kann das aussehen

    Diese Zeile müsste Dein Problem lösen:

    1. 'GETvar' => 'L',
    2. 'valueMap' => array(
    3. 'de' => '0',
    4. 'en' => '1',
    5. ),
    6. ),
    7. 'valueDescription' => array(
    8. 'de' => 'Deutsch',
    9. 'en' => 'Englisch',
    10. ),
    11. 'valueDefault' => 'de',
    12. ),

    Wie Du oben sehen kannst wird diese in den Prevars hinterlegt
    Ebenso wie oben
    1. 'pagePath' => array(
    2. 'type' => 'user',
    3. 'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
    4. 'spaceCharacter' => '-',
    5. 'languageGetVar' => 'L',
    6. 'expireDays' => 30,
    7. 'segTitleFieldList' => 'tx_realurl_pathsegment,alias,nav_title,title',
    8. 'rootpage_id' => 1,
    9. 'excludePageIds' => ''
    10. ),

    Ich denke das wird Dein Problem lösen.
    Nur mit den zusätzlichen Extensions mußt du aufpassen
    mfg
    starkheim

  • einpraegsam.net einpraegs...
    MacGyver
    0 x
    9340 Beiträge
    80 Hilfreiche Beiträge
    19. 08. 2008, 21:18

    Oder du nutzt die Autoconf

    in2code.de - Wir leben TYPO3
    - Möchtest du TYPO3 komplett verstehen? Eigene Erweiterungen erstellen? Bei uns gibt es auch Schulungen https://www.in2code.de/produkte/typo3-schulungen/
    - Die Arbeit mit TYPO3 macht dir Spaß? Du stehst auf Berge? Komm zu uns! https://www.in2code.de/agentur/karriere/

  • starkheim starkheim
    Padawan
    0 x
    44 Beiträge
    0 Hilfreiche Beiträge
    19. 08. 2008, 22:39

    Hallo
    das könnte er machen,
    aber dann muss er trotzdem noch der Config mitteilen wie diese Url zum umwandeln ist.
    Ich kenne mich mit Autoconf nicht so aus. Alles kann man auch nicht wissen.
    Aber ich lerne gerne was dazu.
    Wie würde dann diese Zeile aussehen? Bin gespannt drauf.
    Ich bin mir sicher, dass dies auch der Themenersteller Lucas :D ;) auch gerne wissen will.
    mfg
    starkheim

  • 1