|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Junior Member
Iscritto dal: Nov 2006
Messaggi: 13
|
.htaccess e sottocartella
Ciao ragazzi,
ho creato un .htaccess per indirizzare il dominio su una cartella specifica da me creata nella cartella default "web" del server. Ovvero, vorrei indirizzare il dominio in questa cartella: /web/cartellacreata Ecco il codice che ho scritto in .htaccess: RewriteEngine on RewriteCond %{REQUEST_URI} !^/cartellacreata/ RewriteRule (.*) http://www.miodominio.ch/cartellacreata/$1 [R=301] Ora digitando http://www.miodominio.ch appare anche il nome della cartella, ovvero http://www.miodominio.ch/cartellacreata Come faccio a nasconde dall'indirizzo "cartellacreata" in modo che appaia solamente http://www.miodominio.ch? Grazie dell'aiuto ![]() M. |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Sep 2002
Città: localhost
Messaggi: 1115
|
prova aggiungendo
Codice PHP:
naturalmente cambia l'estensione dell'index se non hai html, metti php, asp ecc ecc
__________________
« Indovina la foto e vinci premi! GeoGuess.com «« [
![]() « MacBook Pro i7 2.2 GhZ 6750M + SSD EVO 250GB - Samsung S7 « |
![]() |
![]() |
![]() |
#3 |
Junior Member
Iscritto dal: Nov 2006
Messaggi: 13
|
Ho trovato questo e funziona alla grande
Codice:
# Bluehost.com # .htaccess main domain to subfolder redirect # Copy and paste the following code into the .htaccess file # in the public_html folder of your hosting account # make the changes to the file according to the instructions. # Do not change this line. RewriteEngine on # Change yourdomain.com to be your main domain. RewriteCond %{HTTP_HOST} ^(www.)?yourmaindomain.com$ # Change 'subfolder' to be the folder you will use for your main domain. RewriteCond %{REQUEST_URI} !^/subfolder/ # Don't change this line. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Change 'subfolder' to be the folder you will use for your main domain. RewriteRule ^(.*)$ /subfolder/$1 # Change yourdomain.com to be your main domain again. # Change 'subfolder' to be the folder you will use for your main domain # followed by / then the main file for your site, index.php, index.html, etc. RewriteCond %{HTTP_HOST} ^(www.)?yourmaindomain.com$ RewriteRule ^(/)?$ subfolder/index.php [L] Ora come faccio per nascondere pure il nome della cartella anche nelle sottocartelle della sottocartella? Quando clicco su "amministratore", apparte quanto segue: http://www.miosito.ch/nomecartella/amministratore Io vorrei: http://www.miosito.ch/amministratore Ovvero eliminare "nomecartella" Scusate le ripetizioni ^^ Ultima modifica di St3rMiN4ToR : 09-08-2008 alle 18:01. |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 05:47.