View Single Post
  #1 (permalink)  
Old 04-09-2007, 21:15
MattHawkins MattHawkins is offline
new member
 
Join Date: Jul 2007
Location: UK
Posts: 9
Exclamation htaccess ReWrite Problems

Hi everyone,

I've got an .htacess that is doing some basic URL rewriting.

It looks something like this :

Code:
# ReWrite required to format URLs for search engines
RewriteEngine On

RewriteRule ^archive.html+ index.php?module=archive
It works fine. The user puts in archive.html but actually gets the results of index.php?module=archive. No problems.

As I've recently ditched Postnuke in preference for my own efforts I need to direct some of the old Postnuke style URLs to their equivalent pages in my new system.

So I added :

Quote:
redirect /index.php?module=pagesetter&tid=4 http://www.matthawkins.co.uk/index.php?itemid=56
ie I want the Pagesetter article with id=4 to actually go to my index.php page with itemid set to 56.

This doesn't work. It just gives me my homepage ... which implies that my index.php file is being run with unwanted parameter module=pagesetter and tid=4. ie no rewriting is happening at all.

Doesn't work either. But ...

Quote:
redirect /indexxxxxx.php http://www.matthawkins.co.uk/index.php?itemid=56
does.

This all implies that rewrite doesn't like redirecting URLs where the file actually exists.

How to I redirect the old Postnuke URLs which include index.php when I've already got my own index.php?

None of the help I've found on the internet mentions this. In fact most of the help implies my existing rewrites shouldn't work because I haven't escaped the . in my filenames with a \ !!

Any thoughts or suggestions would be appreciated.

Matt
Reply With Quote