Forum Moderators: phranque

Message Too Old, No Replies

Simple rewrite

Getting rid of?

         

aijohn

4:24 am on Aug 3, 2005 (gmt 0)

10+ Year Member



I know this is basic but I haven't been able to make it work.

How do I use mod_rewrite to change

myscript.php?name=smith

myscript.php?name=adams

myscript.php?name=jones

to
smith.php
adams.php
jones.php

or

smith.htm
adams.htm
jones.htm

jdMorgan

4:37 am on Aug 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why do you want to do this? What is your goal?

The answers will determine the solution, because it's not a simple question.

If you have dynamic URLs linked from your pages, then change the links to static on those pages. You can then use mod_rewrite to detect those static URLs and pass the requests to your script in query-string format.

If you've already done that, and your problem is that search engines won't drop the old dynamic URLs, then the answer is completely different... There are many variations [google.com], depending on the exact nature of the problem.

Jim

aijohn

4:42 am on Aug 3, 2005 (gmt 0)

10+ Year Member



Just starting a new site and would like to have all pages be htm before the search engines crawl it. part of the content site is database driven and would like it to look the same as the static pages.