Change links throughout site. Best way?

I have about 500 links to archived issues of a newsletter that have been
moved into a member only area, which is changing the link from
/archives/whateverissue.html to /members/archives/whateverissue.html. What
is my best option for changing all these links, without doing it manually?
The archived issues aren’t part of the site, so I can’t just move them to
the members folder in FW and have the links update. I also don’t want to use
Source Code Snooper or MassReplaceIt, because I would have to use it every
week when the pages are updated. I was hoping I could do a search and
replace in the document, but it won’t let me do that with URLs. Or, I can’t
find a way to do that with URLs. Is there anything else I could do?

Robin Stark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Use an .htaccess rule to do it all in one whack. There’s a great
tutorial on the Apache.org site about just this very thing, and the
time you invest in figuring this out for your server will be paid back
thousands of times over. Apache’s mod_rewrite is the Swiss Army Knife
of Web development, hands-down.

http://httpd.apache.org/docs/1.3/misc/rewriteguide.html

Walter

On Mar 31, 2009, at 12:12 PM, Robin Stark wrote:

I have about 500 links to archived issues of a newsletter that have
been
moved into a member only area, which is changing the link from
/archives/whateverissue.html to /members/archives/
whateverissue.html. What
is my best option for changing all these links, without doing it
manually?
The archived issues aren’t part of the site, so I can’t just move
them to
the members folder in FW and have the links update. I also don’t
want to use
Source Code Snooper or MassReplaceIt, because I would have to use it
every
week when the pages are updated. I was hoping I could do a search and
replace in the document, but it won’t let me do that with URLs. Or,
I can’t
find a way to do that with URLs. Is there anything else I could do?

Robin Stark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Struggling here. Nothing I’ve tried is working yet.
I have the .htaccess file in the archives directory that I want redirected.
I have moved all the files into the members directory. Inside the archives
directory are more directories. Does that make a difference? It’s not just a
bunch of .html files.

I’ve tried a number of combinations, even just a redirect, but nothing is
being redirected. Am I close? It’s not working.

RewriteEngine on
RewriteRule ^/archives/(.*) http://domain.com/members/archives/$1[R=301,L]

I have moved /archives/ to /members/archives/

I understand the concept, but I don’t understand the coding. I’ve Googled
more examples and tried to find any information that caters to those of a
lesser intelligence, but I’m having “issues.”

Robin Stark

On Tue, Mar 31, 2009 at 11:21 AM, Walter Lee Davis email@hiddenwrote:

Use an .htaccess rule to do it all in one whack. There’s a great tutorial
on the Apache.org site about just this very thing, and the time you invest
in figuring this out for your server will be paid back thousands of times
over. Apache’s mod_rewrite is the Swiss Army Knife of Web development,
hands-down.

http://httpd.apache.org/docs/1.3/misc/rewriteguide.html

Walter

On Mar 31, 2009, at 12:12 PM, Robin Stark wrote:

I have about 500 links to archived issues of a newsletter that have been

moved into a member only area, which is changing the link from
/archives/whateverissue.html to /members/archives/whateverissue.html. What
is my best option for changing all these links, without doing it manually?
The archived issues aren’t part of the site, so I can’t just move them to
the members folder in FW and have the links update. I also don’t want to
use
Source Code Snooper or MassReplaceIt, because I would have to use it every
week when the pages are updated. I was hoping I could do a search and
replace in the document, but it won’t let me do that with URLs. Or, I
can’t
find a way to do that with URLs. Is there anything else I could do?

Robin Stark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This rule looks as though it’s written to live in the site root. If
you are using it in the old (now empty) archives folder, the match
would be this:

RewriteRule ^(.*)$ http://domain.com/members/archives/$1 [R=301,L]

And you might also need to set the RewriteBase directive if you’re
doing this inside your archives folder.

Walter

On Mar 31, 2009, at 2:38 PM, Robin Stark wrote:

Struggling here. Nothing I’ve tried is working yet.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m ashamed to say that I didn’t really learn very much, but I did figure
out that I could go into my Cpanel and do a wildcard redirect, and then I
looked at the code, which was:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^domain.com$ [OR]

RewriteCond %{HTTP_HOST} ^www.domain.com$

RewriteRule ^archives/?(.*)$ “http://domain.com/members/archives/$1
[R=301,L]

And, yes, this one was created in the root directory. Looking at it now, I
understand it, but I don’t know how long it would have taken me to do it
myself. Days, probably.

On Tue, Mar 31, 2009 at 2:01 PM, Walter Lee Davis email@hiddenwrote:

This rule looks as though it’s written to live in the site root. If you are
using it in the old (now empty) archives folder, the match would be this:

RewriteRule ^(.*)$ http://domain.com/members/archives/$1 [R=301,L]

And you might also need to set the RewriteBase directive if you’re doing
this inside your archives folder.

Walter

On Mar 31, 2009, at 2:38 PM, Robin Stark wrote:

Struggling here. Nothing I’ve tried is working yet.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yay! You could probably cut out the two host RewriteCond statements
and it would also work. Those are only there if you want to really
redirect from one domain name to another. But the key here was putting
the .htaccess file in the correct directory. If you had it in /
resources before, then it wouldn’t ever have matched on /resources/ in
the URL, since that part wouldn’t have been there at that point.

Walter

On Mar 31, 2009, at 3:32 PM, Robin Stark wrote:

I’m ashamed to say that I didn’t really learn very much, but I did
figure
out that I could go into my Cpanel and do a wildcard redirect, and
then I
looked at the code, which was:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^domain.com$ [OR]

RewriteCond %{HTTP_HOST} ^www.domain.com$

RewriteRule ^archives/?(.*)$ “http://domain.com/members/
archives/$1”
[R=301,L]

And, yes, this one was created in the root directory. Looking at it
now, I
understand it, but I don’t know how long it would have taken me to
do it
myself. Days, probably.

On Tue, Mar 31, 2009 at 2:01 PM, Walter Lee Davis
email@hiddenwrote:

This rule looks as though it’s written to live in the site root. If
you are
using it in the old (now empty) archives folder, the match would be
this:

RewriteRule ^(.*)$ http://domain.com/members/archives/$1 [R=301,L]

And you might also need to set the RewriteBase directive if you’re
doing
this inside your archives folder.

Walter

On Mar 31, 2009, at 2:38 PM, Robin Stark wrote:

Struggling here. Nothing I’ve tried is working yet.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Right, and that should have been obvious to me, about the path, but I was
simply not seeing it. Plus, I didn’t use a question mark. Oy, there is so
much to learn!
Thanks for your help, Walter – again.

Robin Stark

On Tue, Mar 31, 2009 at 2:44 PM, Walter Lee Davis email@hiddenwrote:

Yay! You could probably cut out the two host RewriteCond statements and it
would also work. Those are only there if you want to really redirect from
one domain name to another. But the key here was putting the .htaccess file
in the correct directory. If you had it in /resources before, then it
wouldn’t ever have matched on /resources/ in the URL, since that part
wouldn’t have been there at that point.

Walter

On Mar 31, 2009, at 3:32 PM, Robin Stark wrote:

I’m ashamed to say that I didn’t really learn very much, but I did figure

out that I could go into my Cpanel and do a wildcard redirect, and then I
looked at the code, which was:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^domain.com$ [OR]

RewriteCond %{HTTP_HOST} ^www.domain.com$

RewriteRule ^archives/?(.*)$
http://domain.com/members/archives/$1
[R=301,L]

And, yes, this one was created in the root directory. Looking at it now, I
understand it, but I don’t know how long it would have taken me to do it
myself. Days, probably.

On Tue, Mar 31, 2009 at 2:01 PM, Walter Lee Davis <email@hidden

wrote:

This rule looks as though it’s written to live in the site root. If you

are
using it in the old (now empty) archives folder, the match would be this:

RewriteRule ^(.*)$ http://domain.com/members/archives/$1 [R=301,L]

And you might also need to set the RewriteBase directive if you’re doing
this inside your archives folder.

Walter

On Mar 31, 2009, at 2:38 PM, Robin Stark wrote:

Struggling here. Nothing I’ve tried is working yet.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options