• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

.htaccess problem

R

roymilder

Guest
Hi there,

I have the following setup:
domain.com, with the root dir /httpdocs/ (default location).
I have a subdomain as well, located in directory /sub.domain.com (which is not in /httpdocs/, but one directory lower).
Within Plesk I have created a redirect to this subdomain: redirectdomain.com => sub.domain.com

I want to work with an .htaccess.

At first the .htaccess wasn't working for the domain and the subdomain. Then I found this article:
http://kb.parallels.com/en/124

Followed the instructions and my .htaccess is now working for the domain, but not for the subdomain.
I have placed an .htaccess in the directory of the subdomain. But it isn't working.

The contents of the .htaccess that is located in the directory of the subdomain:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([a-z.]+)?oxhale\.nl$ [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .? http://www.%1oxhale.nl%{REQUEST_URI} [R=301,L]
</IfModule>

The contents of my /etc/httpd/conf.d/zz010_psa_httpd.conf file:

AccessFileName .htaccess

<Directory "/var/www/vhosts">
Options +All
AllowOverride All
Order allow,deny
Allow from all
</Directory>

So what am I doing wrong? Help is very much appreciated!

Cheers,
Roy

ps. i'm using Plesk 10.4.4 at Hostgator.com
 
Back
Top