iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Search Engine Optimization Forum SEO is much easier with help from peers and experts! The WebProWorld SEO forum is for the discussion and exploration of various search engine optimization topics. Any non (engine) specific SEO or SEM topics should go here.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-08-2007, 04:23 PM
WebProWorld Member
 
Join Date: Sep 2005
Location: South Africa
Posts: 54
cppgenius RepRank 0
Default Renaming files from .htm to .php

I want to convert one of my sites into a dynamic site with PHP because there is a lot of repetitive code on each page that I would like to put in a single php script to make the maintenance of the site easier.

The problem is, the site is almost a year old and a lot of SEO work has been done on this site. Its traffic can still be greatly increased, but I do not want to loose the traffic I already get from the search engines.

I have not access to the .htaccess file so I am forced to rename all my pages to php to have the code parsed by the server. Because of this I also can't do 301 redirects from a file with an htm/html extension.

So the best way to do this is with a 0-second meta refresh, something that is supported by most browsers and accepted by most Search Engines as something similar to a 301 redirect. I know you need to stay away from JavaScript redirects, another reason why I switched to PHP to have more server side scripting done opposed to faulty client-side scripting.

I have prepared all the html files with the proper meta refreshes, but I would like to know how long should I keep these "place holders" for my old pages on my server. The search engines may re-index my site and hopefully transfer the PageRank to the new pages, but what about all the inbound links from other sites (even some I may not be aware off) is it wise to keep these redirecting pages for an infinite time on my server.

Thanks I appreciate the help.
Reply With Quote
  #2 (permalink)  
Old 01-09-2007, 05:19 AM
adbart's Avatar
WebProWorld Veteran
 
Join Date: Apr 2005
Location: London, UK
Posts: 463
adbart RepRank 0
Default

Quote:
Originally Posted by random website
Meta Refresh URL Redirect is an example of a meta refresh URL redirect. The code is quite simple.
<meta http-equiv="refresh" content="8;url=http://www.seocompany.ca/index.html" />
Meta tag refresh is known to not be very search engine friendly and is consider spammy because of its misuse. If you keep it up around 8 seconds it is said it is ok. This method displays the new page that the refresh points to.
The thing about leaving the redirect high (8 secs or so) sounds like common sense.

I'd consider putting it at 10 or something. Also, on each original .htm page, put a link to the new page on it, e.g:

Code:
<center>This page has moved.

Click here to go to the new page.</center>
__________________
Freelance IT consultant & SEO marketing
Private message for contact information
Reply With Quote
  #3 (permalink)  
Old 01-09-2007, 10:48 AM
Webnauts's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: Aug 2003
Location: Worldwide
Posts: 8,167
Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9
Default

Never use meta refresh! Too risky!

Do that with PH. See here how simple that is: http://php.about.com/od/learnphp/ht/phpredirection.htm
__________________
"Being an expert isn't telling other people what you know. It's understanding what questions to ask, and flexibly applying your knowledge to the specific situation at hand. Being an expert means providing sensible, highly contextual direction." Jeff Atwood
SEO Workers - Search Engine Optimization Consulting Company | SEO Analysis Tool | Webnauts Net SEO
Reply With Quote
  #4 (permalink)  
Old 01-09-2007, 02:24 PM
WebProWorld Member
 
Join Date: Sep 2005
Location: South Africa
Posts: 54
cppgenius RepRank 0
Default

adbart I used exactly the method you described but only with 0-second refresh. I will make it 10 seconds like you suggested. Luckily I have not uploaded any files yet so no damage done. Good thing I asked for advice first.

Webnauts thanks for the page on PHP redirection. Unfortunately my web hosts only allow PHP parsing in .php files so no parsing is done in .htm files and like I said I have no access to the .htaccess file so I cannot configure the PHP settings on the server.

But the link you provided was a lifesaver with a page of another site I had redirection problems with. The redirection worked on my local Apache server but failed once I uploaded it too my server. I never knew that the PHP code should be the only code in the file with no text to be sent to the browser before the PHP script. The redirection started working once I removed the other text from the file.

I hit two flies with one question. Thanks guys!

I just wonder why the redirection succeeded on my local server, which setting allows a mixture of HTML and the 301 PHP code in the same file? Any ideas?
Reply With Quote
  #5 (permalink)  
Old 01-09-2007, 03:25 PM
WebProWorld Pro
 
Join Date: Sep 2005
Location: Manchester, UK
Posts: 254
mikesmith76 RepRank 0
Default

You can set headers and have html in the same php file, but all calls to header() MUST be made before ANY html is outputted, or you will receive an error to that effect. If you didn't get an error on your local server you must have error reporting off (or very low)
Reply With Quote
  #6 (permalink)  
Old 01-09-2007, 06:57 PM
WebProWorld Member
 
Join Date: May 2005
Location: Hoboken NJ metro New York
Posts: 38
Serrbiz RepRank 0
Default A meta refresh DANGER DANGER

A meta refresh is an ultra dangerous method to use. Even though it sounds like you 100% ethical in you purpose, the spammers used that tag to excess and it just to much of a risk.

Google says this about redirects.

Don't employ cloaking or sneaky redirects.

.htaccess with a 301 code is the best. If your server doesn't allow this, then switch servers. You shouldn't have to spend more $29 a month for quality hosting with root level and .htaccess.
__________________
Serr.biz - Ethical SEO,SEM and Blog marketing
Comprehensive e-brand marketing.
Call 800.556.7449 for a free consultation.
Reply With Quote
  #7 (permalink)  
Old 01-09-2007, 07:21 PM
DrTandem1's Avatar
WebProWorld 1,000+ Club
 
Join Date: Oct 2003
Location: Encinitas, CA
Posts: 1,830
DrTandem1 RepRank 2
Default

Some hosts allow a simple line of code in the .htaccess file that will treat each .html page as if it were PHP. You can then keep the page files as whatever.htm and still have the PHP function. Something like this:

AddType application/x-httpd.php .html .php

Are you sure you don't have access to the .htaccess file? If not, maybe change hosts to one that will work.
__________________
DrTandem's San Diego Web Page Design, drtandem.com
Reply With Quote
  #8 (permalink)  
Old 01-09-2007, 07:29 PM
WebProWorld Pro
 
Join Date: May 2004
Location: Austin, TX
Posts: 199
steve0 RepRank 0
Default

If there is a lot of repetitive code, and the site is optimized..

How about server side includes?
__________________
Hardcore Programming Solutions and Coffee Drinker
Reply With Quote
  #9 (permalink)  
Old 01-10-2007, 01:05 AM
WebProWorld New Member
 
Join Date: Nov 2006
Posts: 17
Andy Beard RepRank 1
Default

I totally agree with DrTandem

If you really don't have the ability to modify your .htaccess, it is time to find a new host.

There shouldn't be a need to change your file names and lots of scripts require htaccess to provide user friendly URLs.
__________________
Andy Beard
Reply With Quote
  #10 (permalink)  
Old 01-10-2007, 01:41 AM
WebProWorld Member
 
Join Date: May 2004
Location: bay area
Posts: 56
caromero1965 RepRank 0
Default Get a new host!

I'm with Andy on this one-- if you're sure you don't have access to the .htaccess file (or can't create one for each directory), then... forget about these guys, they're not worth hosting with anyway. Can you say who they are? It really sounds like they're giving you a raw deal.

I'm using cheap hosting at 1and1.com and finding it perfectly serviceable for running WordPress blogs (though a bit sluggish at time, in the $10 a month plan I'm using). A really good host for Linux/Apache stuff, by all accounts (though I haven't tried them) is Media Temple (mediatemple.net). Have a look at both of these. I'm sure plenty of people here can recommend others as well.
__________________
-a
Reply With Quote
  #11 (permalink)  
Old 01-10-2007, 07:53 AM
WebProWorld Member
 
Join Date: Jan 2007
Location: India
Posts: 38
ddwebguru RepRank 0
Default

but it's not the proper method - i mean to change server, i know yahoo server do not give access the .htaccess file, so what we have to do??
Reply With Quote
  #12 (permalink)  
Old 01-10-2007, 07:59 AM
WebProWorld Member
 
Join Date: Jan 2007
Location: India
Posts: 38
ddwebguru RepRank 0
Default

hi
there is a great discussion about redirection. hope it may help you >
http://www.webmasterworld.com/apache/3208525.htm
Reply With Quote
  #13 (permalink)  
Old 01-10-2007, 08:18 AM
WebProWorld New Member
 
Join Date: Nov 2006
Posts: 17
Andy Beard RepRank 1
Default

ddwebguru if they don't give access, it is what customers do, take their money elsewhere.
__________________
Andy Beard
Reply With Quote
  #14 (permalink)  
Old 01-10-2007, 09:00 AM
WebProWorld Member
 
Join Date: Jan 2007
Location: India
Posts: 38
ddwebguru RepRank 0
Default

yea i am agree but if we get some other way it will be much better
Reply With Quote
  #15 (permalink)  
Old 01-10-2007, 09:16 AM
WebProWorld New Member
 
Join Date: Nov 2006
Posts: 17
Andy Beard RepRank 1
Default

Your sig suggests you are an SEO. If you are working for a client who is using hosting that doesn't allow the use of .htaccess, your first task is to move them to a host that does allow it.

There are so many uses for .htaccess and mod_rewrite as an SEO that it should be a requirement for you to undertake the work.
__________________
Andy Beard
Reply With Quote
  #16 (permalink)  
Old 01-10-2007, 01:38 PM
texxs's Avatar
WebProWorld Veteran
 
Join Date: Jul 2005
Location: Somewhere in scrub of Florida
Posts: 387
texxs RepRank 2
Default

try SSI includes, you don't have the change the file name then.
__________________
Take a break and watch some stupid video clips
Reply With Quote
  #17 (permalink)  
Old 01-11-2007, 01:21 AM
edhan's Avatar
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Singapore
Posts: 716
edhan RepRank 3edhan RepRank 3edhan RepRank 3
Default

Being able to access .htaccess and mod-rewrite is the basic function that you should be able to do so. If not then it will be better finding about hosting service that allows you to do so.
Reply With Quote
Reply

  WebProWorld > Search Engines > Search Engine Optimization 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 03:42 AM.



Search Engine Optimization by vBSEO 3.3.0