Submitted by ikhnaton2 on Tue, 29/08/2006 - 21:04.
( categories: )

I have drupal on http://ikhnaton2.com/whisper. I created a subdomain called http://whisper.ikhnaton2.com. I need to redirect request from http://whisper.ikhnaton2.com/{path} to http://ikhnaton2.com/whisper/{path}. I add the following lines to .htaccess in /www (which is the DocumentRoot) to do the redirect:


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]

Results:
Requests for: http://ikhnaton2.com or http://www.ikhnaton2.com -> go to: http://www.ikhnaton2.com/whisper/ successfully

Requests for: http://ikhnaton2.com/{anything} or http://www.ikhnaton2.com/{anything} -> goes to: http://www.ikhnaton2.com/whisper/ successfully

Requests for: http://whisper.ikhnaton2.com/{anthing} or http://www.whisper.ikhnaton2.com/{anything} doesn't go: http://www.ikhnaton2.com/whisper/{anything}

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


Here you are!

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


WWW: The place for organized randoms!

Internal Server Error

ikhnaton2's picture

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...


Rami Sedhom
http://ikhnaton2.com

What's in the error log

MSameer's picture

What's in the error log ?


WWW: The place for organized randoms!

Nothing related to

ikhnaton2's picture

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


Rami Sedhom
http://ikhnaton2.com

I've seen this before

Check here, it's not a fix but might give you hints: http://www.eglug.org/node/2048

Comment viewing options

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