Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×
The Internet

OctaneZ's Journal: Apache and mod_rewrite 1

Journal by OctaneZ
I wish apache had a mechanism to use mod_rewrite without having to have a vhost for each domain that you want to redirect. At the moment I have this defined in each vhost I want to redirect:

RewriteEngine on
RewriteCond %{HTTP_HOST} domain.org$ [NC]
RewriteRule ^(.*)$ http://server.domain.edu/$1 [R]

Am I missing something obvious?

This discussion has been archived. No new comments can be posted.

Apache and mod_rewrite

Comments Filter:
  • by Anonymous Coward
    If you're complaining that you have to have vhosts for domain.com, domain.net, domain.cc, domain.tv, and so on and so forth to get everything to redirect to domain.edu, then you just need the domain.edu vhost, and outside of that vhost, use rewrite to rewrite everything to domain.edu (with a RewriteCond set to skip domain.edu itself. I don't think this will loop without one, but it will put an extra burden on the server).

    You can also set up a file to map various addresses to multiple vhosts, rather than ma

What the world *really* needs is a good Automatic Bicycle Sharpener.

Working...