WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Site Design > Graphics & Design Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-22-2003, 02:47 PM
WebProWorld Member
 

Join Date: Jul 2003
Posts: 54
tenaki RepRank 0
Default HTML to PHP

Hi all

When we set up our website we were very new to it all and just went with the flow and created all our pages in html.

Now however, certain new pages and things like the gallery, forum etc are in php.

I have tried to use php includes on html pages for things like random photo's or forum threads but it just aint working.

The only way I can see is to change my index.html to index.php,

So to the question/s

What will happen to the thousands of links, especially those on search engines? if I create a redirect will those links still find my pages?

Any ideas appreciated
Reply With Quote
  #2 (permalink)  
Old 10-22-2003, 02:56 PM
ranjan's Avatar
WebProWorld Pro
 

Join Date: Sep 2003
Location: CA
Posts: 174
ranjan RepRank 0
Default

http://www.desilva.biz/apache/rewrite.html
__________________
ranjan | Macromedia Certified Dreamweaver MX Developer
http://www.dreamlettes.net - a dreamweaver resource
http://www.ranjan.ws - got blog?
http://www.total-impact.com - a web design community
Reply With Quote
  #3 (permalink)  
Old 10-22-2003, 03:25 PM
WebProWorld Veteran
 

Join Date: Jul 2003
Location: Bristol, UK
Posts: 965
carbonize RepRank 0
Default

Why would he want to use modrewrite when all he wants is to redirect?

Make a .htaccess file and place it in the root folder of your site (the main folder where your index page is). The redirect code you need in the htaccess file is

Code:
Redirect permanent /oldpage.htm http://www.domain.com/archive/oldpage.htm
for a little more info goto http://www.carbonize.co.uk/Webdesign/htaccess.php

BUT when alls said and done the index page will be served to the visitors regardless of it's extension. So long as you only have a single index page the server will send that to the visitors browser.
__________________
Carbonize
Reply With Quote
  #4 (permalink)  
Old 10-22-2003, 03:27 PM
tikanet's Avatar
WebProWorld Pro
 

Join Date: Jul 2003
Location: San Diego, CA, US
Posts: 291
tikanet RepRank 0
Default

The php initialization (configuration) file has to be told where include files can be found (what path to use to get to them). Check with your host and/or sys admin to get all that sorted out.
__________________
Stew P.
Tika Web Development Group
http://www.inetworld.net/dennisw/images/sill_trans.gif
Reply With Quote
  #5 (permalink)  
Old 10-22-2003, 03:30 PM
WebProWorld Member
 

Join Date: Jul 2003
Posts: 54
tenaki RepRank 0
Default

Thanks both

I have looked in my control panel and there is a "manage redirects" where you can set up temp and permanent redirects.

Would this do the same job? and would Google links etc still find the pages I don't want loads of 404 errors
Reply With Quote
  #6 (permalink)  
Old 10-22-2003, 04:19 PM
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: Toronto, Canada
Posts: 2,193
cyanide RepRank 0
Default

Yes that would work.

You have to be careful though.
If you have alot of stuff in the .htaccess already,
then doing it through the control panel could give you error messages.

In that case, you should do it manually.
as suggested by carbonize
__________________
|
Web Hosting Guru
| Need Help For Your Forum?
Reply With Quote
  #7 (permalink)  
Old 10-28-2003, 03:29 PM
WebProWorld Member
 

Join Date: Jul 2003
Posts: 54
tenaki RepRank 0
Default

Thanks all, another plus for webPro

I went for the alteration to the .htaccess file in the end as I was a bit worried about errors with a redirect, and I am so paranoid about upsetting my search engine results lol.

thanks ranjan for the link and thanks to desilva.bz for working it through with me.
http://www.desilva.biz/apache/rewrite.html
Reply With Quote
  #8 (permalink)  
Old 10-28-2003, 05:43 PM
WebProWorld Veteran
 

Join Date: Jul 2003
Location: Bristol, UK
Posts: 965
carbonize RepRank 0
Default

Using a .htaccess redirect will not affect search engine placement. The redirect works by sending the people to the new page when they request the old page and search engine bots are coded to expect this sometimes.
__________________
Carbonize
Reply With Quote
  #9 (permalink)  
Old 10-29-2003, 04:47 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Bedfordshire, UK
Posts: 340
le_gber RepRank 0
Default

tenaki, if all you want to do is changing page extensions but you keep the same page name and domain name you may want to try the following:

#forward spiders and visitors to the new php pages.
RedirectMatch permanent ^(.*)\.htm $1.php

Leo
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum
Tags: ,



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

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


Search Engine Optimization by vBSEO 3.2.0