SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2003
    Location
    Right Here
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mod_rewrite - Please help me, I'm stupid

    I have no familiarity with Apache at all - it's just what I'm hosted on (at Verio).

    I have a number of domain names, which I have pointed at one hosted account, www.shiningsinners.com.

    What I want to do is use mod_rewrite to have those other domains point at specific sub-directories of this site - but I am too dumb to get it to work.

    Can somebody tell me exactly what I would need to put into .htaccess in order to have say www.frootbetty.com point to /fb on the shiningsinner site?

    Thanks!

  2. #2
    FreeBSD The Power to Serve silver trophy pippo's Avatar
    Join Date
    Jul 2001
    Location
    Italy
    Posts
    4,514
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by edgore
    I have no familiarity with Apache at all - it's just what I'm hosted on (at Verio).

    I have a number of domain names, which I have pointed at one hosted account, http://www.shiningsinners.com.

    What I want to do is use mod_rewrite to have those other domains point at specific sub-directories of this site - but I am too dumb to get it to work.

    Can somebody tell me exactly what I would need to put into .htaccess in order to have say http://www.frootbetty.com point to /fb on the shiningsinner site?

    Thanks!
    Hi,
    do you have access to your httpd.conf ?
    VirtualHost is the right solution to your problem.
    So before using mod_rewrite please check that.

    Eventually if you want to use mod_rewrite inside .htaccess,
    and if all domains point to the same directory you could use:
    Code:
    RewriteEngine On
    # Every request for fbdomain.com (www. is optional)
    RewriteCond %{HTTP_HOST} ^(www\.)?(fbdomain)\.com$ [NC]
    # will be redirect to subdirectory fb
    RewriteRule !^fb fb%{REQUEST_URI} [L]
    I don't like that solution because it will heavy your traffic,
    but if you have not alternatives that's what I could suggest.


    :-) pippo
    Mr Andrea
    Former Hosting Team Advisor
    Former Advisor of '03


Bookmarks

Posting Permissions

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