Visualizzazione risultati 1 fino 14 di 14
Like Tree1Likes
  • 1 Post By RedWebSite

Discussione: OSMap, redirect alla sitemap

  1. #1
    Guest

    Predefinito OSMap, redirect alla sitemap

    Ciao a tutti,
    ho fatto la mia sitemap.xml con OSMap e adesso vorrei che sia possibile trovarla all'indirizzo howi.altervista.org/sitemap.xml
    Nel file .htaccess sono andato nella sezione Custom Redirects e ho creato la regola
    Codice:
    RewriteRule ^sitemap.xml$ index.php?option=com_osmap&view=xml&tmpl=component&id=3
    Mi aspettavo quindi di vedere la sitemap all'indirizzo suddetto, ma non c'è nulla.
    La regola che ho scritto è giusta?
    C'è qualche altro parametro da modificare?
    Grazie.

  2. #2
    Guest

    Predefinito

    Se nel file .htaccess hai scritto solo quello è normale che non funzioni.

    Codice:
    RewriteEngine On
    RewriteBase /
    
    RewriteRule ^sitemap.xml$ index.php?option=com_osmap&view=xml&tmpl=component&id=3 [L]

  3. #3
    Guest

    Predefinito

    Citazione Originalmente inviato da vplaza Visualizza messaggio
    Se nel file .htaccess hai scritto solo quello è normale che non funzioni.

    Codice:
    RewriteEngine On
    RewriteBase /
    
    RewriteRule ^sitemap.xml$ index.php?option=com_osmap&view=xml&tmpl=component&id=3 [L]
    Mi viene il dubbio di modificare il file .htaccess sbagliato: chiaramente non c'è scritta solo la regola che ho aggiunto io.
    Ho messo la regola nella sezione Custom Redirects (ed è l'unica regola della sezione), ma il file (che non ho scritto io) è piuttosto complesso. Il RewriteEngine comunque è su On; RewriteBase / era più avanti nel file ed ho provato a metterlo anche prima, sulla riga successiva a RewriteEngine; ho aggiunto anche [L] a fine riga (che cosa vuol dire?).
    Salvato il file, ho riprovato a caricare la pagina ma continua a darmi errore 404.

  4. #4
    L'avatar di darkwolf
    darkwolf non è connesso Super Moderatore
    Data registrazione
    18-04-2007
    Residenza
    Reggiolo (RE)
    Messaggi
    6,552

    Predefinito

    Se Il tuo htaccess (tutto) non contiene segreti di stato, prova a postarlo così proviamo a capire che succede ;)
    » Salvatore Noschese - L'AltroWeb | Seguimi su: facebook | twitter | Google+
    # Che aspetti? Unisciti alla community! Tanti nuovi gruppi ti aspettano


  5. #5
    Guest

    Predefinito

    Può essere un problema legato al cloak impostato dal pannello di controllo di Altervista?

    Ecco il mio .htaccess,

    ##
    # @package Joomla
    # @copyright Copyright (C) 2005 - 2015 Open Source Matters. All rights reserved.
    # @license GNU General Public License version 2 or later; see LICENSE.txt
    ##

    ##
    # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
    #
    # The line just below this section: 'Options +FollowSymLinks' may cause problems
    # with some server configurations. It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that disallows changing it in
    # your .htaccess file. If using it causes your server to error out, comment it out (add # to
    # beginning of line), reload your site in your browser and test your sef url's. If they work,
    # it has been set by your server administrator and you do not need it set here.
    ##

    ## No directory listings
    # /* modifica */
    #IndexIgnore *
    # /* fine */

    ## Can be commented out if causes errors, see notes above.
    #Options +FollowSymlinks
    #Options -Indexes

    ## Mod_rewrite in use.

    RewriteEngine On
    RewriteBase /

    ## Begin - Rewrite rules to block out some common exploits.
    # If you experience problems on your site block out the operations listed below
    # This attempts to block the most common type of exploit `attempts` to Joomla!
    #
    # Block out any script trying to base64_encode data within the URL.
    RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
    # Block out any script that includes a <script> tag in URL.
    RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
    # Block out any script trying to set a PHP GLOBALS variable via URL.
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    # Block out any script trying to modify a _REQUEST variable via URL.
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    # Return 403 Forbidden header and show the content of the root homepage
    RewriteRule .* index.php [F]
    #
    ## End - Rewrite rules to block out some common exploits.

    ## Begin - Custom redirects
    #
    # If you need to redirect some pages, or set a canonical non-www to
    # www redirect (or vice versa), place that code here. Ensure those
    # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
    #
    RewriteRule ^sitemap.xml$ index.php?option=com_osmap&view=xml&tmpl=component &id=3 [L]
    ## End - Custom redirects

    ##
    # Uncomment following line if your webserver's URL
    # is not directly related to physical file paths.
    # Update Your Joomla! Directory (just / for root).
    ##

    # /* modifica */
    RewriteBase /
    # /* fine */

    ## Begin - Joomla! core SEF Section.
    #
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    #
    # If the requested path and file is not /index.php and the request
    # has not already been internally rewritten to the index.php script
    RewriteCond %{REQUEST_URI} !^/index\.php
    # and the requested path and file doesn't directly match a physical file
    RewriteCond %{REQUEST_FILENAME} !-f
    # and the requested path and file doesn't directly match a physical folder
    RewriteCond %{REQUEST_FILENAME} !-d
    # internally rewrite the request to the index.php script
    RewriteRule .* index.php [L]
    #
    ## End - Joomla! core SEF Section.

    # /* modifica */
    # /* fine */
    # # av:Toolbar
    #SetEnv AV_TOOLBAR 1

    # # av:Toolbar
    SetEnv AV_TOOLBAR 0

    # # av:php5-engine
    AddHandler av-php56 .php

  6. #6
    L'avatar di darkwolf
    darkwolf non è connesso Super Moderatore
    Data registrazione
    18-04-2007
    Residenza
    Reggiolo (RE)
    Messaggi
    6,552

    Predefinito

    # /* modifica */
    RewriteBase /
    # /* fine */

    ???

    rewritebase è già definito all'inizio:

    RewriteEngine On
    RewriteBase /

    prova a rimuovere questo secondo. sai mai che causa noie.
    » Salvatore Noschese - L'AltroWeb | Seguimi su: facebook | twitter | Google+
    # Che aspetti? Unisciti alla community! Tanti nuovi gruppi ti aspettano


  7. #7
    Guest

    Predefinito

    Non era quello.
    Ho tolto il secondo RewriteBase / ma continuo ad avere errore 404.

  8. #8
    L'avatar di darkwolf
    darkwolf non è connesso Super Moderatore
    Data registrazione
    18-04-2007
    Residenza
    Reggiolo (RE)
    Messaggi
    6,552

    Predefinito

    trovo info su:
    Codice:
    RewriteRule ^sitemap.xml$ index.php?option=com_xmap&view=xml&tmpl=component&id=1 [L]
    ma, evidentemente, è per un altra sitemap.

    la tua effettivamente esiste:
    http://howi.altervista.org/index.php...component&id=3

    quindi questo rewrite lì messo dovrebbe funzionare:
    Codice:
    RewriteRule ^sitemap.xml$ index.php?option=com_osmap&view=xml&tmpl=component&id=3 [L]
    ...
    Codice PHP:
    ##
    # @package Joomla
    # @copyright Copyright (C) 2005 - 2015 Open Source Matters. All rights reserved.
    # @license GNU General Public License version 2 or later; see LICENSE.txt
    ##

    ##
    # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
    #
    # The line just below this section: 'Options +FollowSymLinks' may cause problems
    # with some server configurations. It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that disallows changing it in
    # your .htaccess file. If using it causes your server to error out, comment it out (add # to
    # beginning of line), reload your site in your browser and test your sef url's. If they work,
    # it has been set by your server administrator and you do not need it set here.
    ##

    ## No directory listings
    # /* modifica */
    #IndexIgnore *
    # /* fine */

    ## Can be commented out if causes errors, see notes above.
    #Options +FollowSymlinks
    Options -Indexes

    ## Mod_rewrite in use.

    RewriteEngine On
    RewriteBase
    /

    ## Begin - Rewrite rules to block out some common exploits.
    # If you experience problems on your site block out the operations listed below
    # This attempts to block the most common type of exploit `attempts` to Joomla!
    #
    # Block out any script trying to base64_encode data within the URL.
    RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
    # Block out any script that includes a <script> tag in URL.
    RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
    # Block out any script trying to set a PHP GLOBALS variable via URL.
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    # Block out any script trying to modify a _REQUEST variable via URL.
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    # Return 403 Forbidden header and show the content of the root homepage
    RewriteRule .* index.php [F]
    #
    ## End - Rewrite rules to block out some common exploits.

    ## Begin - Custom redirects
    #
    # If you need to redirect some pages, or set a canonical non-www to
    # www redirect (or vice versa), place that code here. Ensure those
    # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
    #
    RewriteRule ^sitemap\.xml$ index.php?option=com_osmap&view=xml&tmpl=component&id=3 [L]
    ## End - Custom redirects

    ##
    # Uncomment following line if your webserver's URL
    # is not directly related to physical file paths.
    # Update Your Joomla! Directory (just / for root).
    ##

    # /* modifica */
    # RewriteBase /
    # /* fine */

    ## Begin - Joomla! core SEF Section.
    #
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    #
    # If the requested path and file is not /index.php and the request
    # has not already been internally rewritten to the index.php script
    RewriteCond %{REQUEST_URI} !^/index\.php
    # and the requested path and file doesn't directly match a physical file
    RewriteCond %{REQUEST_FILENAME} !-f
    # and the requested path and file doesn't directly match a physical folder
    RewriteCond %{REQUEST_FILENAME} !-d
    # internally rewrite the request to the index.php script
    RewriteRule .* index.php [L]
    #
    ## End - Joomla! core SEF Section.

    # /* modifica */
    # /* fine */
    # # av:Toolbar
    #SetEnv AV_TOOLBAR 1

    # # av:Toolbar
    SetEnv AV_TOOLBAR 0

    # # av:php5-engine
    AddHandler av-php56 .php
    Ultima modifica di darkwolf : 04-06-2016 alle ore 23.00.52
    » Salvatore Noschese - L'AltroWeb | Seguimi su: facebook | twitter | Google+
    # Che aspetti? Unisciti alla community! Tanti nuovi gruppi ti aspettano


  9. #9
    Guest

    Predefinito

    Ancora niente.
    Questa mattina ho provato a fare le modifiche che mi hai indicato:
    • Options -Indexes attivato
    • ho messo anche un backslash prima del .xml della regola ma non è servito
    • sono andato nel componente osmap e ho visto che avevo lasciato 2 mappe cestinate che ho eliminato definitivamente
    • ho pulito la cache osmap da gestione estensioni e anche da sistema->cancella cache scaduta, più quella del browser

    Tutto ciò non è servito.
    Ho rimesso alcune cose come erano. Questo è il mio ultimo .htaccess
    Codice PHP:
    ##
    # @package Joomla
    # @copyright Copyright (C) 2005 - 2015 Open Source Matters. All rights reserved.
    # @license GNU General Public License version 2 or later; see LICENSE.txt
    ##

    ##
    # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
    #
    # The line just below this section: 'Options +FollowSymLinks' may cause problems
    # with some server configurations. It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that disallows changing it in
    # your .htaccess file. If using it causes your server to error out, comment it out (add # to
    # beginning of line), reload your site in your browser and test your sef url's. If they work,
    # it has been set by your server administrator and you do not need it set here.
    ##

    ## No directory listings
    #IndexIgnore *

    ## Can be commented out if causes errors, see notes above.
    #Options +FollowSymlinks
    Options -Indexes

    ## Mod_rewrite in use.
    RewriteEngine On
    RewriteBase
    /

    ## Begin - Rewrite rules to block out some common exploits.
    # If you experience problems on your site block out the operations listed below
    # This attempts to block the most common type of exploit `attempts` to Joomla!
    #
    # Block out any script trying to base64_encode data within the URL.
    RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
    # Block out any script that includes a <script> tag in URL.
    RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
    # Block out any script trying to set a PHP GLOBALS variable via URL.
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    # Block out any script trying to modify a _REQUEST variable via URL.
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    # Return 403 Forbidden header and show the content of the root homepage
    RewriteRule .* index.php [F]
    #
    ## End - Rewrite rules to block out some common exploits.

    ## Begin - Custom redirects
    #
    # If you need to redirect some pages, or set a canonical non-www to
    # www redirect (or vice versa), place that code here. Ensure those
    # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
    #
    RewriteRule ^sitemap.xml$ index.php?option=com_osmap&view=xml&tmpl=component&id=3 [L]
    ## End - Custom redirects

    ## Begin - Joomla! core SEF Section.
    #
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    #
    # If the requested path and file is not /index.php and the request
    # has not already been internally rewritten to the index.php script
    RewriteCond %{REQUEST_URI} !^/index\.php
    # and the requested path and file doesn't directly match a physical file
    RewriteCond %{REQUEST_FILENAME} !-f
    # and the requested path and file doesn't directly match a physical folder
    RewriteCond %{REQUEST_FILENAME} !-d
    # internally rewrite the request to the index.php script
    RewriteRule .* index.php [L]
    #
    ## End - Joomla! core SEF Section.

    # # av:Toolbar
    SetEnv AV_TOOLBAR 0

    # # av:php5-engine
    AddHandler av-php56 .php
    Ora aspetto una mezz'ora, poi ricommento di nuovo l'options -Indexes e poi non avrò proprio più idee su che altro fare.
    Altre cose che possono interferire?

  10. #10
    L'avatar di RedWebSite
    RedWebSite non è connesso AlterGuru
    Data registrazione
    02-05-2007
    Messaggi
    1,047

    Predefinito

    Ciao, su altervista devi inserire il link full, cioè completo di dominio alla sitemap, la regola è cosi
    Codice:
    RewriteCond %{REQUEST_URI} ^/sitemap.xml
    RewriteRule .* http://howi.altervista.org/index.php...component&id=3 [L]
    http://redwebsite.altervista.org/joo...ndo-osmap.html
    alterjoomla sito web dedicato a joomla ed altervista - Tante guide per joomla anche su RedWebSite
    "C'è una fondamentale differenza tra la religione, che è basata sull'autorità, e la scienza, che è basata su osservazione e ragionamento. E la scienza vincerà perché funziona."

  11. #11
    Guest

    Predefinito [RISOLTO] E' fatta!

    Yeaaaaaaah!
    Grazie mille RED.
    Ancora una volta sei stato fondamentale. Devo ricordarmi di andare più spesso a vedere il tuo sito.
    Finalmente ora posso andare a iscrivermi alla google search console e a comunicare il mio indirizzo.
    Ho proprio voglia di andare a vedere questi strumenti da webmaster. Era l'ora.
    Grazie comunque a tutti.

    Le correzioni risolutive sono:
    Codice PHP:
    ## Begin - Custom redirects
    #
    # If you need to redirect some pages, or set a canonical non-www to
    # www redirect (or vice versa), place that code here. Ensure those
    # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
    #
    RewriteCond %{REQUEST_URI} ^/sitemap.xml
    RewriteRule
    .* http://howi.altervista.org/index.php?option=com_osmap&view=xml&tmpl=component&id=3 [L]
    ## End - Custom redirects

  12. #12
    Guest

    Predefinito

    Red, posso farti un ultima domanda?
    Stavo leggendo la guida che mi hai lincato e alla fine, nella sezione dei trucchetti, dici di aggiungere al file robots.txt la riga
    Codice:
    Sitemap: http://www.nostrosito.ex/sitemap.xml
    Almeno mi sembra di aver capito così, perché il discorso sul formato SEF mi ha un po' confuso.
    Quello che volevo chiederti è se va aggiunta prima o dopo la serie dei Disallow; inoltre ho visto solo ora che il mio robots.txt ha una estensione del nome del file .dist (robots.txt.dist): cosa vuol dire? devo riportarlo a robots.txt e basta? è anche questa una particolarità di Altervista?

    Io lo farei così:
    Codice:
    # If the Joomla site is installed within a folder such as at
    # e.g. www.example.com/joomla/ the robots.txt file MUST be
    # moved to the site root at e.g. www.example.com/robots.txt
    # AND the joomla folder name MUST be prefixed to the disallowed
    # path, e.g. the Disallow rule for the /administrator/ folder
    # MUST be changed to read Disallow: /joomla/administrator/
    #
    # For more information about the robots.txt standard, see:
    # http://www.robotstxt.org/orig.html
    #
    # For syntax checking, see:
    # http://tool.motoricerca.info/robots-checker.phtml
    
    Sitemap: http://howi.altervista.org/sitemap.xml
    
    User-agent: *
    Disallow: /administrator/
    Disallow: /bin/
    Disallow: /cache/
    Disallow: /cli/
    Disallow: /components/
    Disallow: /includes/
    Disallow: /installation/
    Disallow: /language/
    Disallow: /layouts/
    Disallow: /libraries/
    Disallow: /logs/
    Disallow: /modules/
    Disallow: /plugins/
    Disallow: /tmp/
    Può andare?
    Grazie ancora.
    Ciao

  13. #13
    L'avatar di RedWebSite
    RedWebSite non è connesso AlterGuru
    Data registrazione
    02-05-2007
    Messaggi
    1,047

    Predefinito

    l'iscrizione a search console la potevi fare ugualmente bastava inviare il link non SEF, non penso ci sia differenza su dove l'aggiungi comunque io la metto sotto i disallow

    Edit: scusa non avevo letto una parte... il file robots.dist è quello che viene distribuito nei vari pacchetti di aggiornamento di joomla, ha quell'estensione per non sovrascrivere quello già presente negli spazi web, quindi quello non viene letto come file robots che deve avere l'estensione .txt
    Ultima modifica di RedWebSite : 05-06-2016 alle ore 14.09.43
    howi likes this.
    alterjoomla sito web dedicato a joomla ed altervista - Tante guide per joomla anche su RedWebSite
    "C'è una fondamentale differenza tra la religione, che è basata sull'autorità, e la scienza, che è basata su osservazione e ragionamento. E la scienza vincerà perché funziona."

  14. #14
    Guest

    Predefinito

    Grazie ancora. Ora è tutto chiaro.
    Ciao.

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •