HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Login pop-up returns “Page Not Found”.

Hi! How is everyone?

I'm new here, and I'm not so fluent in English, but I'll try to make myself clear.

I have a new Vanilla installation on https://esporo.net/forum/ (ignore the design, please, I'm still working on it), and I was trying to log in today, but the login popup only returns Page not found. The login actually works when accessing the login page at https://esporo.net/forum/entry/signin, but only there.

Also, the registration page at https://esporo.net/forum/register return a Page not Found message too.

How can I resolve these issues?

Thanks in advance.

vrijvlinder

Best Answer

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    Accepted Answer

    ok, replace all of that with this

    # Modified
    # If you modify this file then change the above line to: # Modified
    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /. 
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
       RewriteBase /thenameofmysubdirectory
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    
    arthrfrts

Answers

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    The register link should be entry/register if you use that it works... make sure your links are correct.

    R_Jarthrfrts
  • @vrijvlinder Thanks for the answer!

    Actually, I just used the shortcodes given in default.master.tpl (you can see this file here on GitHub), so I don't know what I'm doing wrong. If is a problem with my theming, or my .htaccess configuration (I didn't changed it, but who knows) or maybe a permission problem…

    But, again, thanks a lot for your response!

    vrijvlinder
  • @vrijvlinder An update regarding this issue.

    I believe it was something with my .htaccess configuration. I reinstalled Vanilla, now in a subdomain https://forum.esporo.net and it's working perfectly.

    I'm pasting my .htaccess file here, maybe we can find together what is causing this problem for future reference?

    # Original
    # If you modify this file then change the above line to: # Modified
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        # Certain hosts may require the following line.
        # If vanilla is in a subfolder then you need to specify it after the /.
        # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
        # RewriteBase /
    
        RewriteCond %{QUERY_STRING} ^p=/?([^&]+)(&([^?]+))?$
        RewriteRule ^index\.php %1?%3 [E=X_REWRITE:1,L]
    
        # The basic rewrite rule.
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php [QSA,E=X_REWRITE:1,E=X_PATH_INFO:/$1,L]
    
        # Add the proper X_REWRITE server variable for rewritten requests.
        RewriteCond %{ENV:REDIRECT_X_REWRITE} .+
        RewriteCond %{ENV:REDIRECT_X_PATH_INFO} (.+)
        RewriteRule ^index\.php - [QSA,E=X_REWRITE:1,E=!REDIRECT_X_REWRITE,E=X_PATH_INFO:%1,E=!REDIRECT_X_PATH_INFO,L]
    
        # 301 redirect urls that start with index.php
        #RewriteCond %{REQUEST_METHOD} GET [NC]
        #RewriteCond %{REQUEST_URI} ^(.*?)/index\.php(.*)$
        #RewriteRule ^index\.php /%1%2 [QSA,R,L]
    </IfModule>
    
    <IfModule mod_headers.c>
       <FilesMatch "(?<!embed)\.(css|js|woff|ttf|eot|svg|png|gif|jpeg|jpg|ico|swf)$">
          Header set Cache-Control "max-age=315360000"
          Header set Expires "31 December 2037 23:59:59 GMT"
       </FilesMatch>
    </IfModule>
    

    Again, thanks for the help!

    vrijvlinder
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    Accepted Answer

    ok, replace all of that with this

    # Modified
    # If you modify this file then change the above line to: # Modified
    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /. 
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
       RewriteBase /thenameofmysubdirectory
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    
    arthrfrts
  • Oh, I see now! It wasn't just copying htaccess.dist, I should have look at it first! Sorry, my bad!

  • R_JR_J Ex-Fanboy Munich Moderator

    You have removed the body-tags id and class in your template. That will have unpredictable failures as a consequence.


    hgtonight
Sign In or Register to comment.