latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: Aaron Hill

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing topic 1 (of 1 total)
Topic Count Last Reply
S2 member and htaccess error

By:  Mamdouh Samy in: Community Forum

voices: 5
replies: 12

4 years, 7 months ago  DrByte

Viewing topic 1 (of 1 total)

My Latest Replies (From Various Topics)

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Saturday Jun 9th, 2012 at 10:44 pm #16098
Aaron Hill
Username: armahillo

Thanks for the suggestion — I stuck the following in my wp-header.php file in the theme:

<!-- FOO
<?php
echo network_home_url() . '
' . c_ws_plugin__s2member_utils_urls::parse_url (network_home_url ("/"), PHP_URL_PATH);
?>

which yielded:

<!-- FOO
http://lenormand.info
/
-->

The “RewriteBase” line that was being added incorrectly was using the value “lenormand” rather than “/” (which is what it should be).

Also, I don’t know if this is relevant, but the Begin/End WordPress htaccess stuff has been automatically written three times. (The block that has: RewriteCond %{REQUEST_FILENAME} !-f in it)

The plugin, on the whole, works great. But for some reason, it seems to be messing up when doing writes/re-writes to the .htaccess file.

Posted: Tuesday Jun 5th, 2012 at 12:38 am #15423
Aaron Hill
Username: armahillo

Hi Cristián,

The WordPress Address and Site Address are both set to: http://lenormand.info — but the RewriteBase is just “lenormand” (no quotes).

Is there a particular option or record in the DB that I should double-check? Or better yet — can you tell me which file to look at in S2? I’m not saying that S2 specifically is at fault here, I just want to know what it’s referencing specifically so that I can at least verify that it is or isn’t a problem with the WP installation.

Thanks!

Aaron

Posted: Sunday Jun 3rd, 2012 at 10:54 am #15281
Aaron Hill
Username: armahillo

I am still having problems with this. Whenever I save the options, it re creates the block, using the wrong ReWriteBase. Under “Download Options”, in the “Preventing GZip conflicts on server”, it display the block as it is being written (in its incorrect form)

Here’s what it’s showing:

RewriteEngine On
RewriteBase lenormand
RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+
RewriteRule .* – [E=no-gzip:1]

And here’s what it should be doing (this is what I correct it to EVERY TIME I SAVE THE OPTIONS). The WordPress-created RewriteBase lines above use the correct location as well.

RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+
RewriteRule .* – [E=no-gzip:1]

The site’s URL is lenormand.info, which MIGHT be where it’s deriving that from, I don’t know. I have browsed through all the S2 and WP options to look for somewhere that might have “lenormand” as a value, and have found nothing.

S2 Version Info:
Version: 120601
Stable tag: 120601

The normal permalink structure and RewriteRules defined by WordPress are no problem; the only time this issue is created is when S2 is saved. Any suggestions? Really, if I just knew how it was creating its RewriteBase line, that would probably be enough. I guess I could go poking around in the source and see what I find. I’ll post back here if I find anything.

Posted: Sunday Mar 11th, 2012 at 9:48 am #7858
Aaron Hill
Username: armahillo

I had this problem and was able to correct it changing one line on the .htaccess file addition:

RewriteBase Foobarbaz

to

RewriteBase /

Just replace the “RewriteBase” in the S2 addition to your .htaccess so that it duplicates what was in the original WP block.

Either the installation incorrectly set this up, or my client typed the wrong thing in (if that’s the case, perhaps the installation form could do better prompting on the line for that setting?). Either way — it’s fixable. :)

Viewing 4 replies - 1 through 4 (of 4 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.