Page 1 of 1

redirect index2.html to index1.html?from=9 not working

PostPosted: 01. December 2005 02:19
by andre75
I have installed a CMS and transfered my photo site. The CMS (drupal.org) supports url aliases for nodes, but some rewriting is still needed.
A specific album is called like this
mysite.com/subfolder1/subfolder2/index.html
The next page of the album is called like this:
mysite.com/subfolder1/subfolder2/index.html?from=9
My original site had :
mysite.com/subfolder1/subfolder2/index2.html

I wrote this rewrite rule:
RewriteRule ^index2\.html$ index.html?from=9 [R=301]

before this (this came with the drupal ditribution and makes the urls look nice):
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

It does not have any affect.

The number of subfolders varies, since my static site grew over a long time.

So I tried simply rewriting index2.html to index.html :
RewriteRule ^(.*)index2(.*)$ $1index$2
Which didn't work. This:
RewriteRule ^(.*)index2.html$ $1index.html
Didn't work either.

Someone knows what I am doing wrong?