• Good afternoon.

    When I try to manually go to login form, by typing http://www.veseligsuzturs.lv/wp-admin I got redirected back to front-page (www.veseligsuzturs.lv).
    When I try to add index.php before /wp-admin it opens the login form. After login when i go to site view page and try to click dashboard, it again returns me back to front-page.
    There is no .httaccess file and I have set-up latest WP version. Also no additional plug-ins are installed (only those who came together with WP).
    I have read at least 20 articles with the same problem, but didn’t find any solution.
    Thanks in advance.

    With best wishes,
    Ricards

Viewing 12 replies - 1 through 12 (of 12 total)
  • What urls are entered in Settings -> General?
    What type of server are you using – *nix or Windows?

    Thread Starter puikaaa

    (@puikaaa)

    What happens if you switch back to using the default permalink structure?

    Thread Starter puikaaa

    (@puikaaa)

    Nothing changes.
    The plugins are all off and everything is like as it was right after WP installation.

    [EDITED]
    I even re-installed the WP, that didn’t changed anything.

    You are using a custom permalink structure. Turn it off.

    Thread Starter puikaaa

    (@puikaaa)

    I mentioned before, that I also tried to turn them off, but that didn’t work too.
    I retried again, still with no success!

    There is no .httaccess file

    You cannot use custom permalinks without an .htaccess file.

    Thread Starter puikaaa

    (@puikaaa)

    But seriously i don’t have it. Is it possible that it may be somewhere outside my hosting map (where WP is located)?

    It should be in your WordPress root folder.

    Thread Starter puikaaa

    (@puikaaa)

    It isn’t there. No .httaccess file. I deleted it, but if i try to turn back on custom permalinks, they work, even if there is no .httaccess file within ROOT WP folder.

    No .httaccess file. I deleted it

    You deleted it! Whatever for?

    Thread Starter puikaaa

    (@puikaaa)

    Ok. The solution was to add specific rules for Ngnix:

    server {
            server_name  veseligsuzturs.lv;
            rewrite ^(.*) http://www.veseligsuzturs.lv$1 permanent;
    }
    
    server {
    
        server_name www.domain.lv;
    
        root /home/domain/htdocs;
        index index.php;
    
        if (!-e $request_filename)
        {
            rewrite ^(.+)$ /index.php?q=$1 last;
        }
    
        error_page 404 /index.php;
    
        location ~ \.php$ {
            expires off;
            include /etc/nginx/fastcgi_params;
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param  SCRIPT_FILENAME  /home/domain/htdocs/$fastcgi_script_name;

    This worked perfectly! No .httaccess needed as it is built-in!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘WordPress redirect from wp-admin back to fron-page’ is closed to new replies.