EllisLab text mark
Advanced Search
     
Trouble in SAEF, Safecracker and Comment by redirecting .htaccess
Posted: 18 August 2012 03:16 AM   [ Ignore ]
Avatar
Joined: 2010-07-13
17 posts

Hi All!
Now, I`m trying update EE from 1.6.9 to 2.4 version.
SAEF and Safecracker stopped working on EE 2.4.
In my .htaccess file there is code:

RewriteCond %{REQUEST_FILENAME} !-
RewriteCond 
%{REQUEST_URI} !\..{1,10}
RewriteCond %{REQUEST_URI} !(.*)/$ 
RewriteRule ^(.*)$ http://www.mysite.ru/$1/ [L,R=301] 

When I delete this code - SAEF and Safecracker begin working.

I`m need this redirect, because it glues pages with “/” and without “/”.

 Signature 

Sorry for my English. smile

 
Posted: 20 August 2012 01:07 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hello 4ksner,

I am sorry to hear you are running into this problem.

We do not support any htaccess configurations aside from the one below.

I can move this over to the Community Help Forum if you would like.

<IfModule mod_rewrite.c>
        
RewriteEngine On

        
# Removes index.php
        
RewriteCond $!\.(gif|jpe?g|png)$ [NC]
        RewriteCond 
%{REQUEST_FILENAME} !-f
        RewriteCond 
%{REQUEST_FILENAME} !-d
        RewriteRule 
^(.*)$ /index.php/$1 [L]

        
# If 404s, "No Input File" or every URL returns the same thing
        # make it /index.php?/$1 above (add the question mark)
</IfModule

If there is anything else I can help with, please let me know.

Cheers,

 Signature 

Recent version: EE 2.5.4 | Forum Module 3.1.10 | MSM 2.1.4 | 2.x Bug Tracker | Version Upgrade

 
Posted: 22 August 2012 07:32 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2010-07-13
17 posts

It is a pity that you can not help me.
Please move this topic to the Community Help Forum.

 Signature 

Sorry for my English. smile

 
Posted: 16 September 2012 03:26 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2010-07-13
17 posts

Temporarily solved the problem by changing the redirect is:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteCond 
%{REQUEST_URI} !^\/add-(.*)$
RewriteRule ^([^.]+)(?<!/)$ /$1[R=301,L] 

In this redirect, I added an exception - a page with the prefix “add-”, because they contain the code Safecracker.
I was already happy when it worked, but then I noticed that the comments are not working.
Again, because of the redirect.

I have no idea what to do.

 

 Signature 

Sorry for my English. smile