Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Help needed - Mod Rewrite/redirect for subdomains

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Next:  How does apache terminate cgi's?  
Author Message
mfoggin

External


Since: May 14, 2004
Posts: 1



(Msg. 1) Posted: Fri May 14, 2004 4:45 am
Post subject: Help needed - Mod Rewrite/redirect for subdomains
Archived from groups: alt>apache>configuration (more info?)

Hi,

I'm in need of some assistance (read: please bail me out 'cos I'm
really stuck!)

My webhosts (www.1and1.co.uk) allow subdomains to be created so that
for instance

domain.co.uk/directory1 can be accessed through
subdomain1.domain.co.uk
domain.co.uk/directory2 can be accessed through
subdomian2.domain.co.uk etc

This works fine _except_ the pages can still be accessed via
domain.co.uk/directory

I've done some very basic mod rewrite stuff to replace
http://domain.co.uk with http://www.domain.co.uk and *.shtml to *.php
and the like but after this I get stuck.

What I'd like to do is create a .htaccess file, presumably on a per
directory/subdomain level to rewrite (or redirect?) requests for
domain.co.uk/directory/page.php to subdomain.domain.co.uk/page.php

On the face of it this should be achievable, but to be honest its
beyond me!

Any help would be greatly appreciated.

Mik Foggin

 >> Stay informed about: Help needed - Mod Rewrite/redirect for subdomains 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Rewrite rules & Subdomains - Hi, We are looking to use rewrites rules for subdomains. Ex: http://sub.domain.com -> http://www.domain.com/sub We use this rule: RewriteEngine on RewriteCond %{HTTP_HOST} ^[^.]+\.DOMAIN\.TLD$ RewriteRule ^(.+) ...

Rewrite Rule for subdomains? - Can someone help me with a Rewrite Rule? My document root is: /srv/www/htdocs/www.mydomain.com/htdocs How can I make a rule that changes the webadress www.sub.mydomain.com to www.mydomain.com/Page.php?URL=sub <Directory..

help with mod rewrite needed - There is a program called webcollage that fetches images from random web sites and posts them into a person's screen as a collage. I'd like to redirect this program to just a single image of my choice. I've done the following using mod_rewrite and it..

Help needed with mod rewrite - There is a program called webcollage that fetches images from random web sites and posts them into a person's screen as a collage. I'd like to redirect this program to just a single image of my choice. I've done the following using mod_rewrite and it..

virtualhost/rewrite help needed - Hi I have a (probably simple) vh (and maybe rewrite?) problem - the rule is simple at least and should work IMO - it's strange to me why it doesn't. This is what i do: NameVirtualHost 217.160.75.67 ### ...several vh... <VirtualHost openspirit.d...
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]