Irish SEO,  Marketing & Webmaster Discussion

 

Mod Rewrite

This is a discussion on Mod Rewrite within the Search Engine Optimisation forums, part of the Online Marketing category; Hi Folks, I have a few php pages that i want to convert to normal html through Mod Rewrite e.g. ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Online Marketing > Search Engine Optimisation

Register Forum Rules FAQDonate Calendar Search Today's Posts Mark Forums Read

  #1 (permalink)  
Old 10-07-2008, 06:48 PM
Coder
 
Join Date: Sep 2007
Posts: 85
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
webman1 will become famous soon enough
Default Mod Rewrite

Hi Folks,

I have a few php pages that i want to convert to normal html through Mod Rewrite

e.g.

http://www.site.com/index.php?page=new&cid=999 will change to http://www.site.com/bicycles.html

If i implement this, will my site lose ranking in Google for the existing link?

Thanks,
S
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 10-07-2008, 09:55 PM
paul's Avatar
ninja SEO
 
Join Date: Dec 2006
Location: .de
Posts: 1,251
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
paul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud of
Default

In one word. No*

*Use a 301 redirect and you will be okay.
__________________
my sites :
irish poker / irish jobs / seo faq / advertise jobs free / green card / skiing
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 10-07-2008, 10:02 PM
Coder
 
Join Date: Sep 2007
Posts: 85
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
webman1 will become famous soon enough
Default

Use Mod Rewrite and a 301?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 10-07-2008, 10:15 PM
paul's Avatar
ninja SEO
 
Join Date: Dec 2006
Location: .de
Posts: 1,251
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
paul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud of
Default

in your .htaccess file
Quote:
Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html
Redirect 301 /oldpage2.html http://www.yoursite.com/folder/
Redirect 301 /index.php?page=new&cid=999 /bicycles.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 10-07-2008, 10:26 PM
Coder
 
Join Date: Sep 2007
Posts: 85
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
webman1 will become famous soon enough
Default

So i just input one line like below and this will work?

Redirect 301 /index.php?page=new&cid=999 /bicycles.html

The index.php?page=new&cid=999 page is generated from a CMS php package so will always have to exist i presume and bicycles.html is nonexistant at present.

Do i have to create a blank bicycle.html file first or similar and then use redirect?

I thought Mod Rewrite would be used as i really only want to change the URL of the php page to a more user friendly name

OR AM I JUST TOTALLY BAFFLED
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 10-07-2008, 10:40 PM
blacknight's Avatar
Web Slave
 
Join Date: Jan 2006
Location: Ireland
Posts: 7,241
blacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enough
Default

mod_rewrite makes the browser "think" that the file exists - if you look at the URLs on this site 99% of them are generated using mod_rewrite

The only "real" pages are ones like index.php, newreply.php etc., all the others are just mod_rewrite magic

So, no. You don't need to create blank files. In fact if you do you'll break it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 10-07-2008, 10:58 PM
Coder
 
Join Date: Sep 2007
Posts: 85
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
webman1 will become famous soon enough
Default

Thanks guys

So is this all i need to input in my .htaccess file to change the file url to bicycles.html

Redirect 301 /index.php?page=new&cid=999 /bicycles.html

Is Redirect 301 a Mod Rewrite command so? Sorry, i sound like a DOS Command Line old boy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 10-07-2008, 11:01 PM
blacknight's Avatar
Web Slave
 
Join Date: Jan 2006
Location: Ireland
Posts: 7,241
blacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enough
Default

No. You're confusing two things

A redirect is a redirect ie. it tells apache that content has moved from one place to another (301 permanently, 302 temporary etc.,)

The rewrite rule can do both, but it's not as simple as the one you provided

You might find the mod_rewrite cheatsheet helpful
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 10-07-2008, 11:07 PM
Coder
 
Join Date: Sep 2007
Posts: 85
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
webman1 will become famous soon enough
Default

Thanks BK

I need to look up rewrite so.

Thanks for the tip. Will google mod_rewrite cheatsheet now and have a look
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
mod, rewrite

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


Similar Threads

Thread Thread Starter Forum Replies Last Post
Installing ISAPI Rewrite glengara Server / Technical Administration Tips and Queries 4 01-10-2007 11:38 AM
Welcome panel rewrite wheres me jumpa Forum Management 2 09-09-2007 02:01 PM
Wordpress .htaccess file for no-www and mod-rewrite() Cormac Blogs & Blogging 9 20-03-2007 08:31 AM


Sponsored links

Pepperjam Network
Paid On Results www.zanox.com


All times are GMT +1. The time now is 07:12 PM.


Powered by: vBulletin Version 3.8.2, Copyright ©2000 - 2009, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51