By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,827 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

It's here... but not really

P: n/a
Hi group, hope you can help.

I have a URL on my website that is currently under the directory
mysite.com/something/

But I'd like to change the URL to mysite.com/anotherthing/

This is peasy to do, of course, but I have a really big Google
ranking under the /something URL, and I'm afraid that if I
transfer to the new URL, I'd lose all that.

Is there a way to put all my content under /anotherthing, but
make anyone typing in the URL /something still get all the same
content in /anotherthing?

..htaccess maybe? Or PHP headers? Am I making no sense?

Thanks a lot,
Paul.

Jul 16 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
On Fri, 15 Aug 2003 17:50:39 +0100 in
<message-id:bh**********@newsreader.mailgate.org>
"Paul Neave" <pa**@FAKEneave.com> wrote:
Hi group, hope you can help.

I have a URL on my website that is currently under the directory
mysite.com/something/

But I'd like to change the URL to mysite.com/anotherthing/

This is peasy to do, of course, but I have a really big Google
ranking under the /something URL, and I'm afraid that if I
transfer to the new URL, I'd lose all that.

Is there a way to put all my content under /anotherthing, but
make anyone typing in the URL /something still get all the same
content in /anotherthing?

.htaccess maybe? Or PHP headers? Am I making no sense?

Thanks a lot,
Paul.

If you're using Apache as a Web server Paul, it's best done with that:
RewriteEngine on
RewriteRule ^/something/(.*)$ http://mysite.com/anotherthing/$1
[R=permanent, L]
(note, the RewriteRule line should be on a single line, will wrap in
post)

HTH

Regards,

Ian

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.
Jul 16 '05 #2

P: n/a
have a look..
http://httpd.apache.org/docs/howto/htaccess.html

maybe some help ? dunno ;-) ?

"Paul Neave" <pa**@FAKEneave.com> wrote in message
news:bh**********@newsreader.mailgate.org...
Hi group, hope you can help.

I have a URL on my website that is currently under the directory
mysite.com/something/

But I'd like to change the URL to mysite.com/anotherthing/

This is peasy to do, of course, but I have a really big Google
ranking under the /something URL, and I'm afraid that if I
transfer to the new URL, I'd lose all that.

Is there a way to put all my content under /anotherthing, but
make anyone typing in the URL /something still get all the same
content in /anotherthing?

.htaccess maybe? Or PHP headers? Am I making no sense?

Thanks a lot,
Paul.

Jul 16 '05 #3

P: n/a

On 15-Aug-2003, "Paul Neave" <pa**@FAKEneave.com> wrote:
I have a URL on my website that is currently under the directory
mysite.com/something/

But I'd like to change the URL to mysite.com/anotherthing/

This is peasy to do, of course, but I have a really big Google
ranking under the /something URL, and I'm afraid that if I
transfer to the new URL, I'd lose all that.

Is there a way to put all my content under /anotherthing, but
make anyone typing in the URL /something still get all the same
content in /anotherthing?

.htaccess maybe? Or PHP headers? Am I making no sense?


In the apache config file httpd.conf or .htaccess add
redirect /something http://mysite.com/anotherthing

--
Tom Thackrey
www.creative-light.com
Jul 16 '05 #4

P: n/a
On Fri, 15 Aug 2003 18:21:12 +0100 in
<message-id:bh**********@newsreader.mailgate.org>
"Paul Neave" <pa**@FAKEneave.com> wrote:
"Tom Thackrey" wrote...
In the apache config file httpd.conf or .htaccess add
redirect /something http://mysite.com/anotherthing

Cool - that works, but it changes the URL in the browser to
/anotherthing, whereas I want it to stay as /something but load
in the content from /anotherthing.

Does rewriting rather than redirecting do this?

Ian - I am running Apache, but I don't know how to implement
the script you gave. Do you put it in an .htaccess file?

Many thanks,
Paul.

Ahh, the demo rewriterule I gave you would ahve the same effect as the
Redirect, a new URL.. and ironically, I changed this in my example as I
originally had it set to display the initial /something URL ;)

In a .htaccess file, you should (if enabled anyway.. you _might_ have to
contact your host if it's not your server) be able to use something
like:
RewriteEngine on
RewriteBase /
RewriteRule ^/something/(.*)$ /anotherthing/$1 [L]
This will then take all files / dirs (/something/here.php) by matching
with the (.*) and by using the $1 transfering anything matched to the
new URI.
This would then read /anotherthing but the URL remain /somethign

If your host allows the use of mod_rewrite (which is used for these
rules), you chould be able to drop that above, in the top of your
..htaccess file.. and bingo!

Personally, I've always added stuff to my srm.conf (Apache config) but
that's just me being me =)
HTH clarify further.

Regards,

Ian

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.
Jul 16 '05 #5

P: n/a
"Jim Dabell" wrote:
However, unless you have some convincing evidence that says you will
be punished by search engines for doing the right thing, I'd just use
mod_redirect to emit 301 Moved Permanently responses


I suppose it would be better in the long run to permanently move the
URL to the new URL so it has a greater chance of being ranked higher
in Google. It's just the intermediary time that worries me.

I already have many websites linking to the current URL, which is the
main reason for its current high ranking. Would sending a 301 response
make Google follow the link through, keeping the ranking?

Thank a lot,
Paul.

Jul 16 '05 #6

P: n/a


However, unless you have some convincing evidence that says you will
be punished by search engines for doing the right thing, I'd just use
mod_redirect to emit 301 Moved Permanently responses

Yes, do this sort of thing using Apache 301s, not in PHP. Apache's
redirect system is simple to use, and very tried and tested.

I suppose it would be better in the long run to permanently move the URL
to the new URL so it has a greater chance of being ranked higher in
Google. It's just the intermediary time that worries me.

I already have many websites linking to the current URL, which is the
main reason for its current high ranking. Would sending a 301 response
make Google follow the link through, keeping the ranking?


You'd do better to post that question online within www.webmasterworld.com
, or just search their archives for answers to this already. My view is
that google will update the address within 1-2 months without affecting
your page rank. Google explicitly says that webmasters *should* use HTTP
redirects if changing URL structures.

Also, bear in mind that if there are any links to the old URL, you should
ideally get people to update them, but my experience is that Google
associates the old name with the new name such that their effect on page
rank is no difference, if that makes any sense.

Martin Lucas-Smith www.geog.cam.ac.uk/~mvl22
www.lucas-smith.co.uk

Senior Computing Technician (Web Technician)
Department of Geography, University of Cambridge (01223 3)33390

& Webmaster, SPRI
Scott Polar Research Institute, University of Cambridge
Jul 16 '05 #7

P: n/a
Paul Neave wrote:
Hi group, hope you can help.

I have a URL on my website that is currently under the directory
mysite.com/something/

But I'd like to change the URL to mysite.com/anotherthing/

This is peasy to do, of course, but I have a really big Google
ranking under the /something URL, and I'm afraid that if I
transfer to the new URL, I'd lose all that.

Is there a way to put all my content under /anotherthing, but
make anyone typing in the URL /something still get all the same
content in /anotherthing?

.htaccess maybe? Or PHP headers? Am I making no sense?

Thanks a lot,
Paul.


Stating the blummin' obvious, but how about a symlink from /something to
/anotherthing?

Jul 16 '05 #8

P: n/a


Stating the blummin' obvious, but how about a symlink from /something to
/anotherthing?


Why use an OS-specific (i.e. *nix-only) device when your webserver
provides the facility already?

Martin Lucas-Smith www.geog.cam.ac.uk/~mvl22
www.lucas-smith.co.uk

Senior Computing Technician (Web Technician)
Department of Geography, University of Cambridge (01223 3)33390

& Webmaster, SPRI
Scott Polar Research Institute, University of Cambridge
Jul 16 '05 #9

P: n/a
Martin Lucas-Smith wrote:

Stating the blummin' obvious, but how about a symlink from /something to
/anotherthing?

Why use an OS-specific (i.e. *nix-only) device when your webserver
provides the facility already?

Martin Lucas-Smith www.geog.cam.ac.uk/~mvl22
www.lucas-smith.co.uk

Senior Computing Technician (Web Technician)
Department of Geography, University of Cambridge (01223 3)33390

& Webmaster, SPRI
Scott Polar Research Institute, University of Cambridge


Because this is the most efficient and simple way to achieve the result.
Admitedly not the most elegant :)

Jul 16 '05 #10

P: n/a
"Paul Perkins" wrote:
Stating the blummin' obvious, but how about a symlink from
/something to /anotherthing?

That works a treat... dunno why I didn't think of that before!

My only worry is the ranking in Google thing. I suppose I could
stick with the symlink for now and see how my ranking fairs.
If it starts dropping, then I'll switch to a permanently moved
URL instead.

I'm off to rummage on the Google help pages...
Cheers,
Paul.
Jul 16 '05 #11

P: n/a
Paul Perkins <pa**********@nospam.logicacmg.com> writes:
Stating the blummin' obvious, but how about a symlink from /something
to /anotherthing?


Doesn't achieve the same things as the HTTP Moved Permanently. There
are now two versions of the same content: one at /something, the other
at /anotherthing. You may get penalised by search engines for having
duplicate content.

--
Giles Chamberlin
Jul 16 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.