iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-11-2005, 02:08 PM
WebProWorld Member
 
Join Date: Dec 2004
Posts: 31
balidog RepRank 0
Default 301-redirect

Hallo experts.
Would you tell me how to do a redirect?
We have to change few pages in our HP, and need new URLs for them.
However, is redirect actually the best way?
I ask this, because my webmaster is not very helpful nor reliable, so I have to do it by myself.

Many Thanks
__________________
regards angie
Clicker dog training-----Schutzhund training
Reply With Quote
  #2 (permalink)  
Old 05-11-2005, 03:34 PM
timmathews.com's Avatar
WebProWorld Veteran
 
Join Date: Jan 2004
Location: Fresh from Manhattan
Posts: 860
timmathews.com RepRank 0
Default

balidog -
Get a new webmaster.
email me, tim@timmathews.com I will get you fixed up.
Thanks!
Tim
Reply With Quote
  #3 (permalink)  
Old 05-11-2005, 05:57 PM
WebProWorld 1,000+ Club
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 1,782
cyanide RepRank 0
Default

Aside from getting a new webmaster, you can do it yourself with .htaccess if you are on Apache

Code:
Redirect 301 /oldfolder/oldpage.php http://www.domain.com/newfolder/newpage.php
Make sure it's all on one line and no line breaks
Reply With Quote
  #4 (permalink)  
Old 05-15-2005, 10:02 PM
WebProWorld Pro
 
Join Date: Sep 2004
Location: Oslo, Norway
Posts: 114
kservik RepRank 0
Default

What about redirecting index.php?s12 to static pages? I tried .haccess redirect, but that did not work.
__________________
Neteffects - Europe Search Marketing
Europe Business Directory
Ranking Directories - Resource of Search Engine Ranking Directories.
Reply With Quote
  #5 (permalink)  
Old 05-17-2005, 10:03 AM
Weedy Lady's Avatar
WebProWorld Veteran
 
Join Date: Nov 2003
Location: mid south USA
Posts: 395
Weedy Lady RepRank 0
Default redirecting within the page code

If you leave the old url page on your server (a good idea) you can try adding the following to your coding in the HEAD section:
<META NAME="ROBOTS" CONTENT="noindex,follow">

AND the following script:
<script language="JavaScript">
if (parent.location.href == self.location.href){
window.location.href = 'index.html'
}
</script>

NOTE: that the 'index.html' needs to be whatever page you want to redirect TO.

That might work for .php pages. If it does, you can change the coding for the content part of the page to a clickable link redirect that people will see. This prevents having pages with duplicate content on your site and provides for a manual redirect just in case the script in the head section doesn't work.

Simplistic, and kind of the long way around the barn, but an "if all else fails" suggestion nonetheless.
__________________
The Weedy Lady at
http://www.happydaycards.com
Free E Cards for holidays and all occasions, fun pages and great recipes.
Reply With Quote
  #6 (permalink)  
Old 05-18-2005, 12:50 AM
WebProWorld MVP
WebProWorld MVP
 
Join Date: Jul 2004
Location: Omaha
Posts: 2,714
brian.mark RepRank 3brian.mark RepRank 3
Default Sorry, bad idea.

While the suggestion from Weedy Lady will work, it won't move the SERPs from your old page to the new one.

If you want to make URL's move like you're pointing to I believe mod_rewrite is in order.

In your .htaccess file, do something like the following.

Code:
RewriteEngine On
RewriteRule ^index.php?(.+)$ http://www.site.com/dir/$1.html [I,O,RP,L]
Or, do it in reverse if you want to use the old page but have it appear static.

Code:
RewriteEngine On
RewriteRule ^dir/(.+).html$ http://www.site.com/index.php?$1 [L]
The latter is the more common use whereby you make a static looking page out of a dynamic page.

If you need any more assistance, Google can find a log about mod_rewrite, or just ask.

Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies
Reply With Quote
  #7 (permalink)  
Old 05-18-2005, 12:52 AM
WebProWorld MVP
WebProWorld MVP
 
Join Date: Jul 2004
Location: Omaha
Posts: 2,714
brian.mark RepRank 3brian.mark RepRank 3
Default Shoulda used preview.

I had to edit that a few times to get the $ in the right places. Ugh. Should be right now. I need to learn to use preview.

Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies
Reply With Quote
  #8 (permalink)  
Old 05-18-2005, 01:54 AM
WebProWorld Pro
 
Join Date: Sep 2004
Location: Oslo, Norway
Posts: 114
kservik RepRank 0
Default

Sorry, I did a poor job explaining myself. I dont want to use URL rewrite, but are going to drop an old script for a new one.

I want to redirect page for page from an old script with dynamic URLs to a new script with totally diffrent ant static URLs.

Tried using .htaccess with Redirect 301 /url http://url, but that does not seem to work with .php?123 type pages.

Kim
__________________
Neteffects - Europe Search Marketing
Europe Business Directory
Ranking Directories - Resource of Search Engine Ranking Directories.
Reply With Quote
  #9 (permalink)  
Old 05-18-2005, 02:50 AM
WebProWorld MVP
WebProWorld MVP
 
Join Date: Jul 2004
Location: Omaha
Posts: 2,714
brian.mark RepRank 3brian.mark RepRank 3
Default The first example...

Quote:
RewriteEngine On
RewriteRule ^index.php?(.+)$ http://www.site.com/dir/$1.html [I,O,RP,L]
This example uses the P initiative, which is a perm redirect. It should work for what you're wanting.

Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies
Reply With Quote
  #10 (permalink)  
Old 05-19-2005, 07:54 PM
WebProWorld Pro
 
Join Date: May 2004
Location: Austin, TX
Posts: 199
steve0 RepRank 0
Default

If your pages are dynamic... and you want to "redirect page for page"
A simple way might be:

<?
~pseudo correlation method here~
parse the url, database look up, etc..
~end pseudocode ~

header("HTTP/1.1 301 Moved Permanently");
header("Location:/$newpage");
exit();
}
?>

Just place the 'header' calls before any output.
__________________
Hardcore Programming Solutions and Coffee Drinker
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:48 PM.



Search Engine Optimization by vBSEO 3.3.0