Forum

url rewrite

gareth
16 March 2010, 23:47
Hiawatha version: 6.17.1
Operating System: linux

Hi

Can somebody give suggestion on what the below apache rules will be in Hiawatha

The urls look like this /index.php?route=account/login

Options +FollowSymlinks

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]

Hugo Leisink
17 March 2010, 00:17
That would be:
UrlToolkit {
ToolkitID = my_rewrite
RequestURI exists Return
Match ^(.*)\?*$ Rewrite /index.php?_route_=$1
}

VirtualHost {
...
UseToolkit = my_rewrite
}
gareth
6 April 2010, 18:19
thanks

That has been generaly working but now I have spotted something.

this url format example below is not getting updated following this link (?page=2) when it should.
http://www.mydomain.com/foo?page=2 when I enter this url it does not go to the page 2 link back to the main page

I can't make out if it is the conversion of the rules or my configuration of website application. Is the UseToolkit version the absolute
same function wise?
Hugo Leisink
6 April 2010, 22:15
Please, try this new UrlToolkit rule and let me know if this one works.
UrlToolkit {
ToolkitID = my_rewrite
RequestURI exists Return
Match ^(.*)\?(.*)$ Rewrite /index.php?_route_=$1&$2
Match ^(.*)$ Rewrite /index.php?_route_=$1
}
gareth
6 April 2010, 22:42
I just tried it quckly now. It works. Awesome!
This topic has been closed.