Forum

Need help with some .htaccess conversion

Brian Zerangue
30 December 2012, 10:41
Please forgive me. I can't seem to get my brain working properly today. I've been trying to workout the conversion of these .htaccess rules for the phpMyAdmin replacement, Chive, chive-project.com.
<IfModule mod_rewrite.c>
RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php?__chive_rewrite_on=1&%{QUERY_STRING}
RewriteRule ^$ index.php?__chive_rewrite_on=1&%{QUERY_STRING}
</IfModule>


URLToolkit {
ToolkitID = Chive
Match . Rewrite index.php?__chive_rewrite_on=1&%$1
Match ^$ Rewrite index.php?__chive_rewrite_on=1&%$1
}

Could you please help me with this. This doesn't seem to be working.

Hiawatha version: 8.6
Operating System: Ubuntu 12.04 LTS
Hugo Leisink
30 December 2012, 10:45
URLToolkit {
ToolkitID = Chive
Match .*\?(.*) Rewrite /index.php?__chive_rewrite_on=1&$1
Match .* Rewrite /index.php?__chive_rewrite_on=1
}
Brian Zerangue
30 December 2012, 10:47
I amended my URL Toolkit

URLToolkit {
ToolkitID = Chive
RequestURI exists Return
Match . Rewrite index.php?__chive_rewrite_on=1&%$1
Match ^$ Rewrite index.php?__chive_rewrite_on=1&%$1
}

Tried that and it's not working. Also, in Virtual Host declaration, I'm calling...

UseToolkit = Chive
Brian Zerangue
30 December 2012, 10:52
Thank you Hugo. It looks like I was in the middle of posting while you were posting.

I made your changes and added the Request URL exists Return and it worked!

URLToolkit {
ToolkitID = Chive
RequestURI exists Return
Match .*\?(.*) Rewrite /index.php?__chive_rewrite_on=1&$1
Match .* Rewrite /index.php?__chive_rewrite_on=1
}

THANK YOU SO MUCH!!!!!
Hugo Leisink
30 December 2012, 10:56
You're welcome!
This topic has been closed.