Ready to stab .htaccess in its fucking face... Help would be appreciated...

Status
Not open for further replies.
By the way I added your htaccess rules to mine. But directed it to my php.php file so I could see what was being passed.

phpinfo()

Seems to pass sku just fine.

This is my whole htaccess and as you can see i'm not using the <ifmodule> and such.

Code:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /

ErrorDocument 404 /index.php?page=404

RewriteRule ^-(.*)/(.*)/(.*)/ /index.php?page=$1&xtra=$2&xtrab=$3 [L]
RewriteRule ^-(.*)/(.*)/(.*) /index.php?page=$1&xtra=$2&xtrab=$3 [L]
RewriteRule ^-(.*)/(.*)/ /index.php?page=$1&xtra=$2 [L]
RewriteRule ^-(.*)/ /index.php?page=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$ 
RewriteRule .* /shares/notfound.gif [L]

#THIS SECTION WORKS
#query
RewriteRule ^find/([^/]+) /php.php?q=$1 [L]

#THIS SECTION WORKS
#category
RewriteRule ^find/c/([^/]+) /php.php?c=$1 [L]

#THIS POS DOESNT FUCKING WORK I'M READY TO SHOOT THE DAMN SERVER
#compare sku
RewriteRule ^compare/sku/([^/]+) /php.php?sku=$1 [L]

#THIS WORKS FINE AS WELL
#buy sku
RewriteRule ^buy/sku/([^/]+) /php.php?sku=$1 [L]
So based on this, the htaccess is sound, and it's something on the php side not collecting the value correctly.

I just created a whole new test file and htaccess redirect and it's not passing the query string either, all of the ones I've tested before adding the compare are working fine so I think it's a host issue (maybe cached or something)

Thanks for you help though
 


That would normally be fine Houdas, but what if his scripts are not the only scripts on the server/site?

(I know wordpress uses the method you speak of, but then it becomes a bitch trying to put other code onto the same site at times when wordpress is at the root level, but if just strictly using wordpress, then its fine).
 
That would normally be fine Houdas, but what if his scripts are not the only scripts on the server/site?

You are right, but it would be still doable - only thing needed is that the various scripts would be called from the central script (sort of "modular" architecture). But I admit that I am now really a bit off this thread's theme.
 
That would normally be fine Houdas, but what if his scripts are not the only scripts on the server/site?

(I know wordpress uses the method you speak of, but then it becomes a bitch trying to put other code onto the same site at times when wordpress is at the root level, but if just strictly using wordpress, then its fine).

I went to make a comment like this but your showed up below the comment box as I was typing lol, I really don't want to have to code handlers for each of the possible actions/pages, that's too much for the project so thats why I'm trying to dump it all in htaccess (which SHOULD be working fine but is currently off getting drunk somewhere)

But thanks though
 
Ok, I've got an .htaccess file setup like so:

Code:
snipped code

Maybe its just from staring at it for too long but I can't figure out why the compare rewrite rules aren't working, my querystring isn't being passed to the page it redirects to but on all the other ones it works fine... It's probably some stupid period or some random character I'm not seeing but any ideas as to why just that one section isn't working would be great.

Thanks

The .htaccess looks fine, I bet the problem is elsewhere. Do you have a directory named "compare"? Another .htaccess somewhere in the path mucking it up?
 
nothing i know can cause me more anger than mod rewrite when the rules get too complex. so fucking frustrating
 
Status
Not open for further replies.