logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Set redirects for home page only
Author
musashi66



Joined: 18 Mar 2014
Posts: 1
Location: USA, Denver

PostPosted: Tue 18 Mar '14 18:08    Post subject: Set redirects for home page only Reply with quote

Hello everyone

Total newb here, so please help me. Just started a new job, and they have a Windows Server 2008 r2 running Apache 2.2.

Here is my problem. There is a page on a separate SharePoint environment, under http://domain.edu/yyy/yyy/yyy/yyy. We have a subdomain called http://123.domain.edu . We need the home page of http://123.domain,edu to point to the SharePoint site, so when users type http://123.domain.edu , they are redirected to http://domain.edu/yyy/yyy/yyy/yyy.

The trick is this - we need all sub-directories NOT to redirect. So, whatever is under http://123.domain.edu/subdirectory should not redirect at all. Is this doable?

Also, if it is, I have no clue where to go to make any changes, so any instructions would be great. So far, I have found the text file httpd.conf that I can edit, but I have no clue about the rest.

While I am at it, what is the best book or video series I should watch as a complete newb?

Thanks for any help!!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7306
Location: Germany, Next to Hamburg

PostPosted: Tue 29 Apr '14 16:15    Post subject: Reply with quote

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com [NC]
RewriteRule ^$ <wherever you want to send the redirect> [NC,R=301]
Back to top


Reply to topic   Topic: Set redirects for home page only View previous topic :: View next topic
Post new topic   Forum Index -> Apache