views:

116

answers:

3

I've got a really quirky issue going on with ExpressionEngine. I've got a live test site here.

Essentially, if you attempt to comment on the index's 'Question of the Day,' you get a proper redirect, but the comment never gets to the database.

If I remove my .htaccess and set the site's index page in my control panel to index.php, then all is well. But with the .htaccess and index.php removed, things go haywire.

Here are the comments of my .htaccess file:

RewriteEngine on 
RewriteCond $1 ^(weblog|member|search|site|rss|search|contact|show|commentary|include|about|blog|tags|preview|P[0-9]{2,8}) [NC] 
RewriteRule ^(.*)$ /skad/index.php?/$1 [L]

Any tips to troubleshoot this or ideas where I could be going wrong? If it's any help, you can see a screenshot of my folder structure.

Thanks so much for any answers or simply help that you can give.

More: Also, here are headers for a successful post on a blog entry and a failing post on the index.

Update: I did recently find something else strange. With identical backend settings:backend settings And identical code:identical code

I get http://localhost:8888/skad as one form action and http://skadaddlemedia.com/v2/v2/index.php as the other form action.

At this point, I'm completely lost as to what is going on.

+1  A: 

the "?" after index.php in the RewriteRule suggests that you are on a server running PHP as a CGI script and thus requires the "forced query strings", correct? This may be ancillary to the problem in the question, but it can complicate things to have this requirement. Looks like you're hosted at Site5... I have no experience with them but you might try the workarounds suggested here: http://expressionengine.com/wiki/Workaround_for_Forced_Query_Strings/

Ty W
Hey Ty, so my hunch here is that this is ancillary. I'll give it a shot tomorrow, but given comments are working fine when not on the index. I'd guess there might be another lurking bug. But I'll be sure to give it a whirl and let you know!
Joshua Cody
Ty, just an update, this didn't help my issue. When moving off of a subdomain and onto the root domain, all of the sudden commenting worked fine. I'd still love yours or anyone's help to find why this won't work on a subdomain.
Joshua Cody
A: 

Try changing [L] to [L,QSA] to see if it helps.

sanmai
A: 

I'm not sure but i think that CI and EE are pretty much the same as to the way the htaccess works so this may help you out. It is by a CI guru named Ethan, can't remember the last name, but he is very active in the CI community. Anyway the way that your HTACCESS file is has really been abandoned the new way to do it is a lot easier and you don't have to state your excluded folders it is the best thing since sliced bread for users of MVC or any frameworks i just love it.

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>

i can gurentee you that if it is a htaccess issue this bugger will fix it but the bext thing is you dont have to do a thing to it just drop it in and you never have to edit it again i swear by it. so freaking good like fried chicken in the summer yummy!

remember test it first by just dropping it in place of your current one you wont need all that crazy other stuff you got there in yours promise.

BrandonS
Unfortunately, I didn't have any luck with this, either. I updated my question with some new details. Thanks so much for your attempt to help.
Joshua Cody