.htaccess e clean URL su Aruba

Posts: 88
Iscritto il: 31 Gen 05

Ciao ragazzi, volevo chiedere se avete notizia di una possibile attivazione delle clean url (accesso alle pagine drupal senza ?q=...) su server Aruba. A parità di .htaccess, su un server di Wide (www.wide.it) funzionano, mentre su Aruba no. Su Aruba il PHP è installato come CGI e non come modulo. Qualcuno è riuscito a risolvere il problema? Grazie.


Posts: 343
Iscritto il: 17 Nov 04
Admin di Drupal Italia

ciao stefano,
sto impazzendo io stesso sulla configurazione dell'.htaccess, per risolvere l'annoso problema dei siti che non tengono il login.

L'unica cosa che sono riuscito a concludere, da non esperto di apache, è che gli .htaccess di drupal sono studiati per gli apache 1.x e andrebbero modificati per i provider che montano gli apache 2.x.

l'unica cosa che posso fare è postarti il mio perosonale .htaccess: ho disattivato le voci che ne inibivano il funzionamento.

le voci relative al mod rewrite sembrano funzionare, ma non le ho provate con i clean url. fammi sapere come va a finire.

#
# Apache/PHP/site settings:
#

# Protect files and directories from prying eyes:
<Files ~ "(\.(conf|inc|module|pl|sh|sql|theme|engine|xtmpl)|Entries|Repositories|Root|scripts|updates)$">
  order deny,allow
  deny from all
</Files>

# Set some options
###no### Options -Indexes
###no### Options +FollowSymLinks

# Customized server error messages:
ErrorDocument 404 /index.php

# Set the default handler to index.php:
###no### DirectoryIndex index.php

# Overload PHP variables:
<IfModule mod_php4.c>
   # If you are using Apache 2, you have to use <IfModule sapi_apache2.c>
   # instead of <IfModule mod_php4.c>.
   php_value register_globals        0
   php_value track_vars              1
   php_value short_open_tag          1
   php_value magic_quotes_gpc        0
   php_value magic_quotes_runtime    0
   php_value magic_quotes_sybase     0
   php_value arg_separator.output    "&"
   php_value session.cache_expire    200000
   php_value session.gc_maxlifetime  200000
   php_value session.cookie_lifetime 200000000
   php_value session.auto_start      0
   php_value session.save_handler    user
   php_value session.cache_limiter   none
   php_value allow_call_time_pass_reference  On
</IfModule>

# Various rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine on

  # Modify the RewriteBase if you are using Drupal in a subdirectory and the
  # rewrite rules are not working properly:
  #RewriteBase /drupal

  # Rewrite old-style URLS of the form 'node.php?id=x':
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x':
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite URLs of the form 'index.php?q=x':
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.58 2004/10/09 20:41:49 dries Exp $


Posts: 627
Iscritto il: 20 Nov 04
Admin di Drupal ItaliaRedattore di Drupal Italia. Contribuisco a manuali

Questo .htaccess funziona su Aruba (http://www.matteoferrari.org).
Provate e sappiatemi dire.... ci avevo smanettato un pò e ho trovato qualche opzione che faceva andare Aruba in tilt.

Matteo

#
# Apache/PHP/site settings:
#

# Protect files and directories from prying eyes:
<Files ~ "(\.(conf|inc|module|pl|sh|sql|theme)|Entries|Repositories|Root|scripts|updates)$">
  order deny,allow
  deny from all
</Files>

# Customized server error messages:
ErrorDocument 404 /index.php

# Overload PHP variables:
#<IfModule sapi_apache2.c>
   # If you are using Apache 2, you have to use <IfModule sapi_apache2.c>
   # instead of <IfModule mod_php4.c>.
#<IfModule mod_php4.c>
<IfModule sapi_apache2.c>
   php_value register_globals        0
   php_value track_vars              1
   php_value short_open_tag          1
   php_value magic_quotes_gpc        0
   php_value magic_quotes_runtime    0
   php_value magic_quotes_sybase     0
   php_value arg_separator.output    "&"
   php_value session.cache_expire    200000
   php_value session.gc_maxlifetime  200000
   php_value session.cookie_lifetime 2000000
   php_value session.auto_start      0
   php_value session.save_handler    user
   php_value session.cache_limiter   none
   php_value allow_call_time_pass_reference  On
</IfModule>

# Various rewrite rules
#<IfModule mod_rewrite.c>
<IfModule mod_rewrite.c>

  RewriteEngine on

  # Modify the RewriteBase if you are using Drupal in a subdirectory and the
  # rewrite rules are not working properly:
  RewriteBase /

  # Rewrite old-style URLS of the form 'node.php?id=x':
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x':
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite URLs of the form 'index.php?q=x':
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.56 2003/12/18 18:53:11 dries Exp $

__________________

Matteo

Se ti piace cantare, visita:
CANTinCORO
A-Cappella.it


Posts: 88
Iscritto il: 31 Gen 05

Vi ringrazio per le risposte, ma in entrambi i casi non sono riuscito a far funzionare le clean url. Ho aperto un ticket sul supporto Aruba, speriamo di trovare una soluzione.


Posts: 88
Iscritto il: 31 Gen 05

Mi hanno risposto così:

"L'applicazione in questione e' nativa in ambiente Linux, il suo dominio risiede su hosting windows: gestione htacccess e' una prerogativa di tale servizio, consideri eventualmente un upgrade ad hosting misto win+linux"

Matteo, tu hai un hosting win+linux?


Posts: 627
Iscritto il: 20 Nov 04
Admin di Drupal ItaliaRedattore di Drupal Italia. Contribuisco a manuali

E' vero, non ci avevo pensato.
Siccome non sono un esperto Linux, non so dirti cosa cambia, ma sono sicuro che funzioni, come puoi vedere....
Ciao
Matteo

__________________

Matteo

Se ti piace cantare, visita:
CANTinCORO
A-Cappella.it


Posts: 343
Iscritto il: 17 Nov 04
Admin di Drupal Italia

io sono su hosting linux, e ho i tuoi stessi problemi. secondo me ti hanno semplicemente rimbalzato, in perfetto stile aruba.

notate che gli esempi di .htaccess qui sopra ereno formattati male perché i tag <module> venivano filtrati.
Ora li ho riformattati utilizzando l'html & l t ; (tutto attaccato) per < e & g t ; per >


Posts: 9
Iscritto il: 06 Mar 05

Ciao ragazzi, ottimo lavoro questo portale.

Sto seguendo la discussione poichè ho lo stesso problema vostro: il portale tiene il login fin tanto che non chiudo il browser. Non è critico ma fastidioso.

L'installazione su Aruba Linux sembra andare benone ma bisogna modificare il contenuto del file .htaccess con il testo inserito da Matteo.

Anche i link semplificati funzionano ma bisogna settare la giusta cartella sulla chiamata
RewriteBase /

Se l'installazione è fatta sulla root la semplice barra / va bene ma se abbiamo messo il portale in una cartella allora dovremo aggiungere il nome della cartella, ad esempio
RewriteBase /cms
se abbiamo trasferito Drupal nella cartella cms

Tornando al problema del login, ho seguito un topic sul sito ufficiale http://drupal.org/node/2974 ma non sono riuscito a capirci gran che.

Qualche idea?


Posts: 1
Iscritto il: 25 Feb 05

ecco qui come andremme modificato l' .htaccess per farlo andare su
aruba linux. a me funzica.

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<Files ~
"(\.(inc|module|pl|sh|sql|theme|engine|xtmpl)|Entries|Repositories|Root|scripts|updates)$">
  Order deny,allow
  Deny from all
</Files>

# Set some options.
# Options -Indexes
# Options +FollowSymLinks

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
# DirectoryIndex index.php

# Override PHP settings. More exist in sites/default/settings.php, but
# the following cannot be changed at runtime. The first IfModule is
# for Apache 1.3, the second for Apache 2.
#<IfModule mod_php4.c>
#  php_value
magic_quotes_gpc               
0
#  php_value
register_globals               
0
#  php_value
session.auto_start             
0
#</IfModule>

<IfModule sapi_apache2.c>
  php_value
magic_quotes_gpc               
0
  php_value
register_globals               
0
  php_value
session.auto_start             
0
</IfModule>

# Reduce the time dynamically generated pages are cache-able.
<IfModule mod_expires.c>
  ExpiresByType text/html A1
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # Modify the RewriteBase if you are using Drupal in a
subdirectory and
  # the rewrite rules are not working properly.
  #RewriteBase /drupal

  # Rewrite old-style URLs of the form 'node.php?id=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite current-style URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.66 2005/03/20 19:15:00 dries Exp $

Order deny,allow
Deny from all

# Set some options.
# Options -Indexes
# Options +FollowSymLinks

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
# DirectoryIndex index.php

# Override PHP settings. More exist in sites/default/settings.php, but
# the following cannot be changed at runtime. The first IfModule is
# for Apache 1.3, the second for Apache 2.
#
# php_value magic_quotes_gpc 0
# php_value register_globals 0
# php_value session.auto_start 0
#

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0

# Reduce the time dynamically generated pages are cache-able.

ExpiresByType text/html A1

# Various rewrite rules.

RewriteEngine on

# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
#RewriteBase /drupal

# Rewrite old-style URLs of the form 'node.php?id=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L]

# Rewrite old-style URLs of the form 'module.php?mod=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L]

# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

# $Id: .htaccess,v 1.66 2005/03/20 19:15:00 dries Exp $

-->


Posts: 343
Iscritto il: 17 Nov 04
Admin di Drupal Italia

Ringrazio KeoHK per la segnalazione, sperando che risolva finalmente l'annoso problema del login su hosting aruba.

Ho modificato il tuo post in modo da ripristinare alcuni caratteri, che sarebbero stati altrimenti "mangiati" dal filtro html.

Faccio presente che Drupal 4.6 è in release candidate dal 5 marzo, quindi dovrebbe uscire a giorni la versione definitiva.


Posts: 343
Iscritto il: 17 Nov 04
Admin di Drupal Italia

vi segnalo questo tutorial su volalibero.it in cui viene suggerito di commentare le seguenti righe per far funzionare drupal (mi sembra di capire 4.5.2) su aruba.

# Options -Indexes
# Options FollowSymLinks
# DirectoryIndex index.php


Posts: 54
Iscritto il: 05 Ott 05

Grazie.

myself

__________________

Grazie, myself


Posts: 8
Iscritto il: 14 Dic 05

Ragazzi ma con drupal 4.7.3 il login me lo tiene benissimo su Aruba Linux... Aruba ha risolto di testa sua o è il codice di Drupal che ha aggiunto qualche workaround nativo?


Posts: 54
Iscritto il: 05 Ott 05

Sei sicuro? Io sono su aruba-linux, ma il file .htaccess devo mantenerlo bianco, senza nessuna istruzione, altrimenti mi segnala un errore.

__________________

Grazie, myself


Posts: 20
Iscritto il: 20 Lug 06

ciao ragazzi!
basta inserire nella root principale del sito:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

e chiamarlo .htaccess

a me funziona con drupal 5 e aruba lnx


Posts: 11
Iscritto il: 15 Dic 07

scusate, questo messaggio avrei dovuto scriverlo in una nuova discussione (questa)

-----

ciao a tutti..

questo problema dell'errore 500 su aruba-linux è un po' una maledizione, capita a tutti e quindi è capitato anche a me.

allora, riassumendo..
il mio file .htaccess con tanto di regole di rewrite dell'indirizzo va alla perfezione.
se però in .htaccess aggiungo le opzioni per il php come le seguenti allora viene l' "internal server error" tentando di aprire una qualsiasi pagina:

php_value register_globals 0
php_value track_vars 1
php_value short_open_tag 1
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0
php_value magic_quotes_sybase 0
php_value arg_separator.output "&amp;"
php_value session.cache_expire 200000
php_value session.gc_maxlifetime 200000
php_value session.cookie_lifetime 2000000
php_value session.auto_start 0
php_value session.save_handler user
php_value session.cache_limiter none
php_value allow_call_time_pass_reference On

inoltre quando viene l'internal server error nel log degli errori di aruba viene aggiunta la seguente riga:

Citazione:
.htaccess: Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration

eppure vedo che in questo sito queste opzioni sono sempre citate all'interno del file .htaccess da mettere su aruba...


Posts: 25
Iscritto il: 12 Lug 07

Ciao Ragazzi sono come voi nel panico più totale per installare Drupal 6.4 su aruba...

Ho provato di tutto ma ho sempre questo errore:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, postmaster@walterfantauzzi.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Posts: 25
Iscritto il: 12 Lug 07

Ragazzi io ho un altro problema con questo .htaccess

#
# Apache/PHP/site settings:
#

# Protect files and directories from prying eyes:
<Files ~ "(\.(conf|inc|module|pl|sh|sql|theme|engine|xtmpl)|Entries|Repositories|Root|scripts|updates)$">
Order deny,allow
Deny from all
</Files>

# Set some options
# non supportato da aruba
#Options -Indexes</strong>
# non supportato da aruba
#Options +FollowSymLinks</strong>

# Customized server error messages:
ErrorDocument 404 /index.php

# Set the default handler to index.php:
# non supportato da aruba
# DirectoryIndex index.php

# Overload PHP variables:
<IfModule mod_php4.c>
   # If you are using Apache 2, you have to use <IfModule sapi_apache2.c>
   # instead of <IfModule mod_php4.c>.
   php_value register_globals        0
   php_value track_vars              1
   php_value short_open_tag          1
   php_value magic_quotes_gpc        0
   php_value magic_quotes_runtime    0
   php_value magic_quotes_sybase     0
   php_value arg_separator.output    "&amp;"
   php_value session.cache_expire    200000
   php_value session.gc_maxlifetime  200000
   php_value session.cookie_lifetime 2000000
   php_value session.auto_start      0
   php_value session.save_handler    user
   php_value session.cache_limiter   none
   php_value allow_call_time_pass_reference  On
</IfModule>

# Various rewrite rules
<IfModule mod_rewrite.c>
  RewriteEngine on

  # Modify the RewriteBase if you are using Drupal in a subdirectory and the
  # rewrite rules are not working properly:
  RewriteBase /drupal51

  # Rewrite old-style URLS of the form 'node.php?id=x':
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x':
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite URLs of the form 'index.php?q=x':
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.58 2004/10/09 20:41:49 dries Exp $

Funziona tutto ma se voglio vedere una immagine che sta sotto la cartella files ho un errore di Aruba

potete vederlo


Condividi contenuti