THELIA Forum

Welcome to the THELIA support and discusssion forum

Announcement

Rejoignez la communauté sur le Discord Thelia : https://discord.gg/YgwpYEE3y3

Offline

#1 Redirection nom de domaine

(18-03-2015 15:20:14)


Hello,

Je souhaiterais si possible faire pointer directement mon nom de domaine principale sur le dossier web de Thelia, pour éviter d'avoir une url à rallonge.

Je suis hébergé chez BlueHost qui conseille ceci dans mon fichier .htaccess:

# BlueHost.com
# .htaccess main domain to subdirectory redirect
# Do not change this line.
RewriteEngine on
# Change example.com to be your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/subdirectory/
# Don't change the following two lines.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /subdirectory/$1
# Change example.com to be your main domain again.
# Change 'subdirectory' to be the directory 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.)?example.com$
RewriteRule ^(/)?$ subdirectory/index.html [L]

Mais ça ne fonctionne pas, savez-vous si le système de routing de Thelia peut bloquer quelque chose à ce niveau là ? Ou c'est une mauvaise manip' de ma part ?
Et sinon, auriez-vous une idée pour mon problème ? J'ai aussi lu qu'on pouvait changer le paramétrage d'apache via une connexion SSH, mais je suis pas trop serein sur cette démarche.

Merci d'avance,

Offline


Il te faut configurer ton hébergement pour faire pointer la racine vers /web au lieu de /, c'est le plus simple.


OpenStudio Toulouse

Offline


Je ne sais pas si c'est ça que tu cherches, mais mon index de site pointe sur le dossier web grâce à ceci rajouté dans mon .htaccess situé à la racine du site:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/web/
RewriteRule ^(.*)$ /web/$1 [L]