Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Redirecting dynamic URLs

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  Redirect Brucie  
Author Message
alfred_molon

External


Since: Nov 29, 2003
Posts: 28



(Msg. 1) Posted: Sat Apr 24, 2004 9:59 pm
Post subject: Redirecting dynamic URLs
Archived from groups: alt>www>webmaster (more info?)

Reasking the question in a more proper manner:

I recently move some pages in my site to a new directory and tried
telling this to the search engines with redirects, for instance:

Redirect 301 /galleries/Malaysia/Rest/img.php?pic=7
http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=4
(all in one line)

This is in a .htaccess file in the directory
http://www.molon.de/galleries/Malaysia/Rest/

and doesn't work (ends up producing the error page).

But a redirect like this
Redirect 301 /galleries/Malaysia/Rest/imagehtm/image7.htm
http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=4

works for instance.

Apparently the server doesn't like a dynamic address in the from part of
the redirect.

The question is then how do tell the search engine that the page has
moved. I've been told that with mod_rewrite you can at least make the
server serve the right page, but that doesn't tell the search engine to
update its URL. Any suggestions ?

--

Alfred Molon

http://www.molon.de/Galleries.htm - Photos from Myanmar, Brunei,
Malaysia, Thailand, Laos, Cambodia, Nepal, Egypt, Austria, Budapest and
Portugal

 >> Stay informed about: Redirecting dynamic URLs 
Back to top
Login to vote
user104

External


Since: Jun 28, 2003
Posts: 1662



(Msg. 2) Posted: Sun Apr 25, 2004 2:55 am
Post subject: Re: Redirecting dynamic URLs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Alfred Molon" <alfred_molon.DeleteThis@yahooDELETE.com> wrote in message
news:MPG.1af4bb5b60d23a6b98a5f3@news.supernews.com...

 > The question is then how do tell the search engine that the page has
 > moved. I've been told that with mod_rewrite you can at least make the
 > server serve the right page, but that doesn't tell the search engine to
 > update its URL. Any suggestions ?

As I said last time. I do it with PHP. Easy. If you must insist on
..htaccess, and keep getting problems, then good luck.
--
Charles Sweeney
<a style='text-decoration: underline;' href="http://www.CharlesSweeney.com" target="_blank">www.CharlesSweeney.com</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Redirecting dynamic URLs 
Back to top
Login to vote
shit

External


Since: Dec 19, 2003
Posts: 355



(Msg. 3) Posted: Sun Apr 25, 2004 12:29 pm
Post subject: Re: Redirecting dynamic URLs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

in post: <news:c6er84$ba3te$1@ID-162618.news.uni-berlin.de>
"Charles Sweeney" <me.DeleteThis@charlessweeney.com> said:

  >> The question is then how do tell the search engine that the page has
  >> moved. [...]

 > As I said last time. I do it with PHP. Easy.

that would also be my recommendation.

--
b r u c i e<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Redirecting dynamic URLs 
Back to top
Login to vote
alfred_molon

External


Since: Nov 29, 2003
Posts: 28



(Msg. 4) Posted: Sun Apr 25, 2004 1:13 pm
Post subject: Re: Redirecting dynamic URLs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Charles Sweeney <me.TakeThisOut@charlessweeney.com> wrote:
 >
  >> The question is then how do tell the search engine that the page has
  >> moved. I've been told that with mod_rewrite you can at least make the
  >> server serve the right page, but that doesn't tell the search engine to
  >> update its URL. Any suggestions ?
 >
 >As I said last time. I do it with PHP. Easy. If you must insist on
 >.htaccess, and keep getting problems, then good luck.

How to do it with PHP ?

--

Alfred Molon

<a style='text-decoration: underline;' href="http://www.molon.de/Galleries.htm" target="_blank">http://www.molon.de/Galleries.htm</a> - Photos from Myanmar, Brunei,
Malaysia, Thailand, Laos, Cambodia, Nepal, Egypt, Austria, Budapest and
Portugal<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Redirecting dynamic URLs 
Back to top
Login to vote
nospam34

External


Since: Oct 20, 2003
Posts: 294



(Msg. 5) Posted: Sun Apr 25, 2004 3:50 pm
Post subject: Re: Redirecting dynamic URLs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Alfred Molon wrote:

 > Reasking the question in a more proper manner:
 >
 > I recently move some pages in my site to a new directory and tried
 > telling this to the search engines with redirects, for instance:
 >
 > Redirect 301 /galleries/Malaysia/Rest/img.php?pic=7
<font color=purple> > <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=4</font" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=4</font</a>>
 > (all in one line)
 >
 > This is in a .htaccess file in the directory
<font color=purple> > <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Rest/</font" target="_blank">http://www.molon.de/galleries/Malaysia/Rest/</font</a>>
 >
 > and doesn't work (ends up producing the error page).
 >
 > But a redirect like this
 > Redirect 301 /galleries/Malaysia/Rest/imagehtm/image7.htm
<font color=purple> > <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=4</font" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=4</font</a>>
 >
 > works for instance.
 >
 > Apparently the server doesn't like a dynamic address in the from part of
 > the redirect.

There is problem redirecting to cgi.

 > The question is then how do tell the search engine that the page has
 > moved. I've been told that with mod_rewrite you can at least make the
 > server serve the right page, but that doesn't tell the search engine to
 > update its URL. Any suggestions ?
 >

If you really want to do this us Apache rewrite rules
<a style='text-decoration: underline;' href="http://httpd.apache.org/docs/misc/rewriteguide.html" target="_blank">http://httpd.apache.org/docs/misc/rewriteguide.html</a>
Using redirects will confuse google.

But why do this at all? Web sites change all the time & let the search bots
sort out the changes.

gtoomey<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Redirecting dynamic URLs 
Back to top
Login to vote
alfred_molon

External


Since: Nov 29, 2003
Posts: 28



(Msg. 6) Posted: Sun Apr 25, 2004 3:50 pm
Post subject: Re: Redirecting dynamic URLs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gregory Toomey <nospam.RemoveThis@bigpond.com> wrote:

 >But why do this at all? Web sites change all the time & let the search bots
 >sort out the changes.

I've noticed that Google keeps searching for a page for many months
after you removed it, even half a year or longer. Another problem are
inbound links.
--

Alfred Molon
------------------------------
<a style='text-decoration: underline;' href="http://groups.yahoo.com/group/Olympus_405080/" target="_blank">http://groups.yahoo.com/group/Olympus_405080/</a>
Olympus 5050 resource - <a style='text-decoration: underline;' href="http://www.molon.de/5050.html" target="_blank">http://www.molon.de/5050.html</a>
Olympus 5060 resource - <a style='text-decoration: underline;' href="http://www.molon.de/5060.html" target="_blank">http://www.molon.de/5060.html</a>
Olympus 8080 resource - <a style='text-decoration: underline;' href="http://www.molon.de/8080.html" target="_blank">http://www.molon.de/8080.html</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Redirecting dynamic URLs 
Back to top
Login to vote
shit

External


Since: Dec 19, 2003
Posts: 355



(Msg. 7) Posted: Sun Apr 25, 2004 10:12 pm
Post subject: Re: Redirecting dynamic URLs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

in post: <news:MPG.1af59134bbbf3fa098a5f4@news.supernews.com>
Alfred Molon <alfred_molon RemoveThis @yahooDELETE.com> said:

 > How to do it with PHP ?

stick something like the following in the img.php file in the old
directory:

header("HTTP/1.1 301 Moved Permanently");
if ($pic==1) {header("Location: <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=1" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=1</a>");}
elseif ($pic==2) {header("Location: <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=2" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=2</a>");}
elseif ($pic==3) {header("Location: <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=3" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=3</a>");}

etc etc etc

or you may want to use a switch instead:

header("HTTP/1.1 301 Moved Permanently");
switch($pic){
case 1: header("Location: <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=1" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=1</a>");break;
case 2: header("Location: <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=2" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=2</a>");break;
case 3: header("Location: <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=3" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=3</a>");

etc etc etc
}

<a style='text-decoration: underline;' href="http://php.net/manual/en/control-structures.elseif.php" target="_blank">http://php.net/manual/en/control-structures.elseif.php</a>
<a style='text-decoration: underline;' href="http://php.net/manual/en/control-structures.switch.php" target="_blank">http://php.net/manual/en/control-structures.switch.php</a>


--
b r u c i e<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Redirecting dynamic URLs 
Back to top
Login to vote
alfred_molon

External


Since: Nov 29, 2003
Posts: 28



(Msg. 8) Posted: Sun Apr 25, 2004 10:12 pm
Post subject: Re: Redirecting dynamic URLs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks Brucie !

--

Alfred Molon

http://www.molon.de/Galleries.htm - Photos from Myanmar, Brunei,
Malaysia, Thailand, Laos, Cambodia, Nepal, Egypt, Austria, Budapest and
Portugal
 >> Stay informed about: Redirecting dynamic URLs 
Back to top
Login to vote
user104

External


Since: Jun 28, 2003
Posts: 1662



(Msg. 9) Posted: Mon Apr 26, 2004 2:38 am
Post subject: Re: Redirecting dynamic URLs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Gregory Toomey" <nospam DeleteThis @bigpond.com> wrote in message
news:1605663.TWXMlj2Ej5@GMT-hosting-and-pickle-farming...

 > But why do this at all? Web sites change all the time & let the search
bots
 > sort out the changes.

I do it to drop dead pages from Google on my house sales site.

Two main reasons:

1. The user's listing is picked up by Google. I don't want it to be there
after the house is sold.

2. Following Google's own advice, I make this a 301 redirect (to my
homepage). I don't want to end up with hundreds of bad pages.

Secondary reason:

I use it to change links from "www" to without "www".
--
Charles Sweeney
<a style='text-decoration: underline;' href="http://www.CharlesSweeney.com" target="_blank">www.CharlesSweeney.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Redirecting dynamic URLs 
Back to top
Login to vote
shit

External


Since: Dec 19, 2003
Posts: 355



(Msg. 10) Posted: Mon Apr 26, 2004 11:20 am
Post subject: Re: Redirecting dynamic URLs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

in post: <news:MPG.1af5ab531aa0ab2e98a5fc@news.supernews.com>
Alfred Molon <alfred_molon RemoveThis @yahooDELETE.com> said:

 > Thanks Brucie !

where do you want to meet for the sexual favors you owe me?

--
b r u c i e<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Redirecting dynamic URLs 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Dynamic pages, static URLS in PHP. - Any pointers to handy bits of PHP or whatever for this one would be much appreciated: Google seems to dig up lots of snake-oil merchants. Being lazy, I'd rather re-use code; being *very* lazy I thought I would ask <ingrate> the experts </ingra...

Referrer URLs - Checking my stats for the month, one of the referrer URLs was evidently sent.by.the.devil How is that possible? I know it's url spoofing but I'm thinking I'm being probed for weaknesses, right? I haven't seen any signs of foul play so far. BTW,..

strange referrers / URLs in stats? - This morning, while taking a look at my web stats, I found these two entries: URL: /images/?q=tbn:tlCOhMe3DV8J:www.zahrawi.com/images/enter-technology-chart2.g if Referrer:..

dynamic html - hi, i have a website with several webpages. there are no frames at all in the website, but each webpage has the same code to create a menu at the side of the page. i was wondering how i could somehow have the menu code in a separate file and then get..

Dynamic menu help - Hi , Trying to get a menu working for sometime now have wasted money on stupid software etc.Now have been trying out a freebee from www.dynamicdrive.com, but have one or two question. It's properly better if I was to show you it so have uploaded it to..
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]