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. ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||||
| 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 |
| |||||
| in your .htaccess file Quote:
|
| ||||
| 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 |
| |||||
| 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 |
| ||||
| 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 |
| |||||
| 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 |
| |||||
| |
| Tags |
| mod, rewrite |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |
| ||||
| | ![]() | |||
| | ||||