[TYPO3-english] Realurl for subdirectory Typo3 installation without showing subdirectory name in Domain url

Guan Ming guanming.jgh at gmail.com
Fri Dec 28 03:40:00 CET 2012


Hi, everyone

Could anyone explain how I can config cpanel or realurl or Typo3 so that
realurl only display Primary Domain Name (e.g. www.abc.com) WITHOUT
subdirectory name (e.g. www.abc.com/subdir/) where my Typo3 was installed.

I tried with .htaccess method, for example like following, but doesn't
work. It will redirect www.abc.com to www.abc.com/subdir/ without
displaying /subdir/, but all its web links/pages will still display
/subdir/ (baseURL = http://www.abc.com/subdir/ ).  If baseURL = www.abc.com/,
error may occur. Change of domain record also doesn't help at all.

(Above scenario doesn't happen to Addon Domain, which work perfect, only
with Primary/Main Domain)

###################################

RewriteEngine On
Options +FollowSymlinks

RewriteBase /

RewriteCond %{HTTP_HOST} ^www\.abc\.com [nc]
RewriteCond %{REQUEST_URI} !subdir/
RewriteRule ^(.*)$ subdir/$1 [L]

RewriteCond %{HTTP_HOST} ^abc\.com [nc]
RewriteCond %{REQUEST_URI} !subdir/
RewriteRule ^(.*)$ subir/$1 [L]

#######################################

Merry Christmas and Happy New Year 2013


More information about the TYPO3-english mailing list