Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004
    Flint, Michigan

    looking for some mod_rewrite help

    I purchaed a domain name a while ago that has ended up being longer than I like to type in. In any event I just purchased another domain a bit shorter and I currently have quite a few sites hosted on These sites were added via DirectAdmin so each subdomain has it's own httpd.conf entry as well as it's own named file. I was thinking I could use a mod_rewrite rule to redirect to without having to write out every subdomain. I believe it can work on a wildcard system where traffic going to * gets sent right to *

    Anybody have a nice mod_rewrite ruleset?
    Mike from
    Professional web design and development services.
    In need of a fresh hosting design? See what premade designs we have in stock!
    Web design tips, tricks, and more at

  2. #2
    Join Date
    May 2004
    Lansing, MI, USA

    RewriteEngine On

    RewriteRule http:\/\/(.*)\.shortdomain\.com(.*) http://$$2 [R=301]

    Should do it for you...
    Jacob - WebOnce Technologies - 30 Day 100% Satisfaction Guarantee - Over 5 Years Going Strong!
    Website Hosting, PHP4&5, RoR, MySQL 5.0, Reseller Hosting, Development, and Designs
    Powered By JAM - Professional Website Development - PHP, MySQL, JavaScript, AJAX - Projects Small & Large

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts