• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

.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