Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Set redirects for home page only |
|
Author |
|
musashi66
Joined: 18 Mar 2014 Posts: 1 Location: USA, Denver
|
Posted: Tue 18 Mar '14 18:08 Post subject: Set redirects for home page only |
|
|
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: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 29 Apr '14 16:15 Post subject: |
|
|
Code: | RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com [NC]
RewriteRule ^$ <wherever you want to send the redirect> [NC,R=301] |
|
|
Back to top |
|
|
|
|
|
|