Skip to Content

Redirect subdomain to directory

ikhnaton2's picture

RewriteEngine On
RewriteCond %{HTTP_HOST} !^ikhnaton2\.com$ [OR]
RewriteCond %{HTTP_HOST} !^www\.ikhnaton2\.com$ [OR]
RewriteCond %{HTTP_HOST} !^whisper\.ikhnaton2\.com$ [OR]
RewriteCond %{HTTP_HOST} !^www.whisper.ikhnaton2\.com$ [OR]
RewriteRule ^(.*)$ http://www.ikhnaton2.com/whisper/$1 [R=301,L]

What I'm missing here?!!! Appreciate any help coz I gave up

MSameer's picture

Here you are!

RewriteCond %{HTTP_HOST} ^whisper\ikhnaton2.\.com$

ikhnaton2's picture

Internal Server Error

I tried it but didn't work, I put the following lines instead of all my redirect lines:

RewriteCond %{HTTP_HOST} ^whisper\.ikhnaton2\.com
RewriteRule (.*) http://ikhnaton2.com/whisper/$1 R,L

When I write whisper.ikhnaton2.com, it gives error code 500 (Internal Server Error). Actually it doesn't differ with my conditions...


MSameer's picture

What's in the error log

What's in the error log ?

ikhnaton2's picture

Nothing related to

Nothing related to redirections or something, just few lines of that damn PHP Fatal error:

Maximum execution time of 30 seconds exceeded in
 /home/ikhnaton/public_html/whisper/modules/bidi.module on line ###

bidi sometimes works and sometimes not, bemazakha


I've seen this before

Check here, it's not a fix but might give you hints:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


Dr. Radut | forum