Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 10-06-2008, 05:07 PM   #1
Warrior Member
War Room Member
 
Jeff Simon's Avatar
 
Join Date: Jun 2008
Location: Sacramento, CA, USA.
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
Default Webpage redirects

I'm hoping this is stupidly simple for someone else.
Cause it's giving me a headache.

I redesigned one of my sites. I've got a good start with organic search. The old files were .htm. But the new files are .php. (Discovered the wonderful world of php includes, so that's why the change.)

What I want to do is have my hosting server redirect the old .htm pages to the new .php pages. I want this done without alarming the Searchbots and getting sandboxed. My server company sent me to Mod_Rewrite Forums :: Index, but it's still all greek to me, and I'm hoping someone can help me with a model script to drop into my .htaccess file.
Jeff Simon is offline   Reply With Quote
Old 10-06-2008, 10:10 PM   #2
Warrior Member
War Room Member
 
Jeff Simon's Avatar
 
Join Date: Jun 2008
Location: Sacramento, CA, USA.
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
Default Re: Webpage redirects

Got the answer from a different forum.

Here's what I put in the .htaccess file:

RewriteEngine on
RewriteBase /
RewriteRule (.*).htm$ /$1.php
Jeff Simon is offline   Reply With Quote
Old 10-14-2008, 10:33 AM   #3
Advanced Warrior
War Room Member
 
Sean Kelly's Avatar
 
Join Date: Oct 2006
Location: Ireland
Posts: 750
Thanks: 5
Thanked 34 Times in 24 Posts
Contact Info
Send a message via Yahoo to Sean Kelly Send a message via Skype™ to Sean Kelly
Default Re: Webpage redirects

This is the perfect result Jeff because you get to keep your urls as they were before but now your .htm and .html files are processed as .php files.

You just need to put your PHP code into your .htm and .html files now.
Be sure to put the .htaccess file in the root (base) folder.

Sean

http://www.ViralPDF.com - The #1 PDF Rebrander since 2002
http://www.PdfPrinterPro.com - Create PDFs with Audio, Video and Flash inside
http://www.PdfLocker.com - Lock & Encrypt your PDFs quickly & easily
Sean Kelly is offline   Reply With Quote
Old 10-14-2008, 06:43 PM   #4
Warrior Member
War Room Member
 
Jeff Simon's Avatar
 
Join Date: Jun 2008
Location: Sacramento, CA, USA.
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
Default Re: Webpage redirects

Quote:
Originally Posted by Sean Kelly View Post
You just need to put your PHP code into your .htm and .html files now.
Thanks, Sean.
I'm not sure I understand this one.
I put no php code into the old .htm pages. When, for instance, the old index.htm file is accessed they get a look at the new index.php file.

Am I leaving something undone?

Thanks,
Jeff Simon is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Tags
redirects, webpage

Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 09:42 AM.