Subdomain redirect to its subfolder, Safari showing too many redirects occurred while trying to open
I did the same. But instead of using, .htaccess
I put these lines
RewriteEngine On
RewriteCond %{HTTP_HOST} ^one\.domain\.com
RewriteRule ^(.*)$ /folder/$1 [R=301]
in / etc / apache2 / sites-available / default.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride All // I even changed None to All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All // I even changed None to All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine On
RewriteCond %{HTTP_HOST} ^one\.domain\.com
RewriteRule ^(.*)$ /folder/$1 [R=301]
</VirtualHost>
After restarting apache2 when I browse one.domain.com
Mozzila IE Chrome is not responding, but safari gives error
+3
source to share