![]() |
|
Using GET with mod_rewrite on - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Using GET with mod_rewrite on (/thread-1353.html) |
Using GET with mod_rewrite on - SubJunk - 2007-04-08 The problem is that I am trying to use a get method (or post, doesn't matter to me really but I do like having the information in the URL better than not) but it seems mod_rewrite is preventing that from working, it just changes the URL so no form information is actually passed. Using GET with mod_rewrite on - trisweb - 2007-04-10 Where are you trying to do it? It might be better to use a GET request for the ZP page if you just redirect back or something anyway. Also, there's an option, QSA for mod_rewrite rules that appends the query string. Zenphoto currently does not use it :-( But I thought it worked anyway! I do it with the AJAX (it just submits a GET request with the current URL appended with ?whatever=stuff) so it should work... are you sure you're doing it right? Using GET with mod_rewrite on - SubJunk - 2007-04-10 I'm trying to do it on the album pages of my background websites. The album pages are pretty much outside of zenphoto, as far as the images displaying goes anyway. So that means that I can append the query string of that page easily, so I just want to have little dropdowns where users can order the results and filter them by resolution (exactly the same as here http://www.dualmonitorbackgrounds.com/themes/dmb/search.php ) `ErrorDocument 404 /error404.php RewriteCond %{HTTP_HOST} ^triplemonitorbackgrounds.com RewriteRule ^(.*)$ http://www.triplemonitorbackgrounds.com/$1 [R=permanent,L] RewriteEngine On RewriteBase / RewriteRule ^admin/?$ zen/admin.php [R,L] RewriteCond %{REQUEST_FILENAME} -f [NC,OR] RewriteCond %{REQUEST_FILENAME} -d [NC] RewriteRule ^.*$ - [R,L] RewriteRule index.php$ index.php [L,QSA] RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA] RewriteRule ^page/([A-Za-z0-9-_]+)/?$ index.php?p=$1 [L,QSA] RewriteRule ^(.*)/page/([0-9]+)/?$ index.php?album=$1&page=$2 [L,QSA] RewriteRule ^(.*)/image/(thumb|[0-9]{1,4})/([^/]+)$ zen/i.php?a=$1&i=$3&s=$2 [L,QSA] RewriteRule ^(.*)/image/([^/]+)$ zen/i.php?a=$1&i=$2 [L,QSA] Catch-all - everything else gets handled in PHP for compatibility.RewriteRule ^(.*)/?$ index.php?album=$1 [L,QSA] ` Thanks for your help Using GET with mod_rewrite on - trisweb - 2007-04-10 Ah, I am doing QSA! And that's why it should work. Good! So, maybe you just need to get the URL right, I'm not sure... but it should just append the query string right after the rewritten path... can I see the page that's trying to do this? [Edit: nevermind, I see it... looking now] Using GET with mod_rewrite on - trisweb - 2007-04-10 Ahhhh, I see the problem... it's the internal rewriting that's botching things. It's trying to turn that string into an album name, and then it can't find it, so it throws that error. Looks like you'll have to leave the mod_rewrite off that page... ah well. Should still work fine. Using GET with mod_rewrite on - SubJunk - 2007-04-11 Hmm but isn't it possible to just add some to htaccess that makes it recognize it? I've tried looking at tutorials but nothing I've found explains how L,QSA works... I'll look again Using GET with mod_rewrite on - SubJunk - 2007-04-11 This must seem like a silly question to you but why wouldn't this work?
Or something like that anyway Using GET with mod_rewrite on - trisweb - 2007-04-12 Because of bugs in mod_rewrite (and because they're distributed in millions of Apache servers around the world, and thus can't be easily fixed) Zenphoto does the parsing of the strings internally, in PHP, so that also would need to be changed in order to allow for a different rewrite structure... I need to recode the internal rewrite to be more flexible, right now it's essentially hardcoded, so I'm sorry about that. Using GET with mod_rewrite on - SubJunk - 2007-04-12 Ah okay, fair enough. Can you tell me where the PHP code is? It will probably be a waste of time for me to look at it but I can give it a try. |