sottodomini e www

5 contenuti / 0 new
Ultimo contenuto
sottodomini e www

Salve a tutti,
vi spiego quello che mi piacerebbe poter fare in modo da capire se è possibile.

Immaginiamo di avere il dominio www.sito.com e di aver creato in una sottocartella, poniamo dom, un sito per cui poi ho creato il sottodominio dom.sito.com. Questo sito è però quello principale a cui vorrei far puntare il dominio www.sito.com. Se imposto un redirect ottengo il puntamento corretto, ma sulla barra degli indirizzi appare comunque il sottodominio e le pagine interne iniziano sempre con il sottodominio.
Ci sarebbe un modo avere sempre www.sito.com al posto di dom.sito.com, anche sulla barra indirizzi?

Spero di essermi spiegato bene.

Grazie, Luca.

mm... non ho capito esattamente perchè fai questo giro, ma andare a impostare il base_path all'interno del file sites/default/setting.php potrebbe essere una soluzione :)

Ciao
Marco
--
My blog
Working at @agavee

Ciao!

Cerco di spiegarmi meglio.

Ho un sito basato su drupal www.operanarrativa.com. In fase di aggiornamento ho dovuto tener su un paio di versioni e ho inserito nella cartelle v3 la nuova versione puntandoci il sottodominio v3.operanarrativa.com.
Quando la nuova versione è diventata definitiva ho fatto puntare il www.operanarrativa.com a v3.operanarrativa.com.

Il mio obiettivo è che chi arriva sul sito non veda nella barra degli indirizzi v3, ma www e che in tutte le pagine del sito al posto di v3 ci sia sempre www.

Ho provato a mettere www.operanarrativa.com nel file settings nella riga
$base_url = 'http://www.operanarrativa.com'; // NO trailing slash!
ma non cambia nulla...

Grazie, Luca.

..mm cosa dice l'.htaccess? come sono i DNS? come è la struttura attuale del sito (cartelle & c.)?

Ciao
Marco
--
My blog
Working at @agavee

Allora, in public_html ci sono le cartelle

cgi-bin

drupal-5.5
old
pagineaperte
(queste tre sono backup e un altro sito)

v2
v3
(le due versioni del mio sito, v3 è quellla che vorrei mantenere)

E i file
403.shtml

404.shtml

favicon.ico
pagineaperte.zip

il file .htaccess in public_html dice:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^operanarrativa.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.operanarrativa.com$
RewriteRule ^/?$ http://v3.operanarrativa.com [R=301,L]

Dentro v3 ci sono le cartelle di drupal 5 e il file .htaccess dice

#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "(\.(engine|inc|install|module|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
  Order deny,allow
  Deny from all
</FilesMatch>
# 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 in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
</IfModule>
# PHP 4, Apache 2
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
</IfModule>
# PHP 5, Apache 1 and 2
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On
  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600
  # Do not cache dynamically generated pages.
  ExpiresByType text/html A1
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on
  # If your site can be accessed both with and without the prefix www.
  # you can use one of the following settings to force user to use only one option:
  #
  # If you want the site to be accessed WITH the www. only, adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
  # RewriteRule .* http://www.example.com/ [L,R=301]
  #
  # If you want the site to be accessed only WITHOUT the www. , adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
  # RewriteRule .* http://example.com/ [L,R=301]
  # 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.73.2.2 2007/01/26 00:09:37 killes Exp $

Dove posso vedere i DNS?

Ciao, Luca