Index

Subject : Re: LUG: Permanent redirect of NCSU webpage

From : Richard McLane <rsmclane@ncsu.[redacted]>

Date : Tue, 06 Jul 2010 16:40:50 -0400

Parent


Are you trying to redirect a single page, or all of the pages/files in the site?

If you're trying to do all of the files, go with:

RedirectMatch 301 ^/(.*)$ http://www.mynewpage.com/$1

I'm used to doing it vhost files rather than .htaccess files. The other thing is that you may need the path to your directory before that initial slash in the search.

Richard

On Jul 5, 2010, at 5:47 PM, Kevin Hunter wrote:

> At 3:25pm -0600 Mon, 05 Jul 2010, Ben Berry wrote:
>>> I don't think that's that it. The ability to do a sitewide redirect
>>> implies that you have control of the apache server already, which implies
>>> that you *are* the owner of said domain. If that's the case, you're
>>> perfectly allowed to to use .htaccess redirects, and is, I believe, how it's
>>> done.
>>
>> Isn't this his NCSU site? The space hosted on NC State's servers, meaning he
>> doesn't control it? This isn't a sitewide redirect, he's just putting a
>> .htaccess in *his *folder, to redirect everything in that folder...?
>
> I can't speak to the ability to use the .htaccess with NCSU's setup, but I have in the past used .htaccess to redirect from arbitrary directories to arbitrary other URLs. You're right that he doesn't have control of the root ncsu.edu domain so he can't do that redirect, but he should (depending on the configuration of the NCSU apache instance) be able to 301 redirect to his new site just fine.
>
> N.B. it's been about four years since I've last done this particular bit of mojo, so I'm perfectly willing to accept that my information may be out of date.
>
> Kevin

--------------------------------------------------
Richard McLane | Systems Analyst
rsmclane@ncsu.[redacted] | College of Engineering/ITECS
| OIT ISO Provisioning
XXX.513.4575 | NC State University
--------------------------------------------------