Hello,
I'm running Drupal 5.3 for my site, MyiStop.com. I have installed Pathauto module and its working smoothly.
Now, my goal is to give my users with a Sub-domain url that points to their profile page. Currently, the users' profile page has the URL http://www.myistop.com/users/username. But, I want it to be http://admin.myistop.com/.
I have enabled Wildcard support in both my DNS Server and Apache Configuration. Request to any sub-domain of my domain is now pointing to my main site. So, I just tried to use mod_rewrite to re-write the URL. I used the following lines in my .htaccess, but i'm getting "500, Internal Server Error".
RewriteCond %{HTTP_HOST} !^www\.myistop\.com [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.myistop\.com [NC]
RewriteRule ^(.*) http://www.myistop.com/?q=users/$1 [L]Please help me with the mod_rewrite stuff.
Thanks in advance.
R. Kaja Mohideen
- MyiStop.com
Comments
Subscribing - very
Subscribing - very interested in the outcome and thanks for raising the question
Subscribing
Any updates yet?
Baris Wanschers / Sixcolored
Sixcolored
Baris Wanschers (@BarisW)
Drupal specialist
Yes... I got it
Yes... I got it working...
Use the following mod_rewrite stuff to redirect username.domain.com to www.domain.com/users/username
I'm using Pathauto and user profiles are at www.domain.com/users/username
NOTE: In order to make this work, you MUST have enabled Wildcard Support in both your DNS Server and The Apache Configuration.
Assuming your Apache config uses vHosts, your new configuration would look like this:
Try it friends...
R. Kaja Mohideen
MyiStop.com | Revenue Sharing Website | Get Paid to Blog
Thanks, but how to..
get Drupal point to the subdomain links instead of the pathauto links?
Do you use a template function for that?
Great work!
Baris Wanschers / Sixcolored
Baris Wanschers (@BarisW)
Drupal specialist