Forum Moderators: phranque

Message Too Old, No Replies

redirecting many pages

transfer from asp to php

         

SuzyUK

11:18 am on Sep 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Due to moving some domains (from Windows to Apache) I'm going to have a situation where I will need a lot (about 100) of

http://www.example.com/section/page.asp?var=[i]nnn[/i]

style pages [301] redirected to friendly url named pages created via a CMS (PHP/MySQL).

The friendly urls will be named per article, although different categories might be added to URL, so I should be able to create a link to the new URLS from their respective variable number if required via database or array?

will I have to set up a seperate redirect rule for each seperate page.. or can you use arrays[?] in .htaccess

Suzy

jd01

6:53 pm on Sep 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You should be able to do it with QUERY_STRINGs and back-references (variables). How you will write the rules will depend on the structure of the QUERY_STRINGs and the new URLs...

If you are not familiar with mod_rewrite, you might want to have a look in the library to get a better idea of how it works.

If you would post a couple of full example for the unfriendly (old) URLs and of the equivellent friendly (new) URLs, so we can see the structure, we should be able to give you a start.

Justin