WordPress Multisite’s in subdirectory not redirecting to dashboard settings

I am not sure what’s happened but our WordPress multisite that’s been in a subdirectory for the longest time now refuses to redirect to the WPMS dashboard pages. Settings, themes, plugins etc.

All the dashboard settings go to "Sorry! That page doesn’t seem to exist." page. Here’s what we have tried.

  • Renaming plugins folder.
  • Renaming htaccess file and generating it again.
  • Try changing themes but cannot get to the themes settings.
  • Tried moving the site into root directory.
  • Tried multiple snippets of code in the functions.php based on similar problems I have found.

This is my htacess files

 <IfModule mod_rewrite.c>  RewriteEngine On  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]  RewriteBase /  RewriteRule ^index\.php$   - [L]  RewriteCond %{REQUEST_FILENAME} !-f  RewriteCond %{REQUEST_FILENAME} !-d  RewriteRule . /index.php [L]  </IfModule> 

Appreciate any insight?

Cant get wordpress to work on subdirectory

I have an ubuntu server.

I already had nginx and some page there which works.

I wanted to add wordpress on /blog path

I installed wordpress using this setup https://ubuntu.com/tutorials/install-and-configure-wordpress#1-overview

(I didnt start step 7 because i cant get the page to show up)

With the setup wordpress lives in /srv/www/wordpress where i see index.php and everything else

i did modify my nginx conf file

server {      root /var/www/example;    server_name example.com www.example.com;    index index.html index.htm index.nginx-debian.html;    ...    location / {     try_files $  uri $  uri/ =404;   }    location ^~ /blog {     root /srv/www/wordpress;     index index.php;     try_files $  uri $  uri/ /index.php?$  args;      location ~ \.php$   {         try_files $  uri =404;         include       fastcgi_params;         fastcgi_pass;     }   }    ... 

The new part is location ^~ /blog ... and i am unsure how it should look like.

Right now as it is if i go to example.com/blog the browser offers me to download some file. (its a short php file with the name "download")

Thx for any suggestions

Redirect main domain to subdirectory

Following the following code sample I managed to redirect it, however the site URL on the browser show as domain.com/subdirectory and not domain.com.

RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?example.com$   RewriteCond %{REQUEST_URI} !^/subdirectory/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$   /subdirectory/$  1 RewriteCond %{HTTP_HOST} ^(www.)?example.com$   RewriteRule ^(/)?$   subdirectory/index.html [L] 

Alias subdirectory as a subdomain on root domain

I have the following structure:

example.com (Root), app.example.com (actual application)

Users can access their profile as: app.example.com/view/username for example

Is there a way I can show the content of app.example.com/view/username in username.example.com directly?

I tried creating a wildcard subdomain but it doesn’t seem to work as right now I have 2 htaccess files (one for example.com and the other for app.example.com).

Thanks in advance!


File structure is Angular’s (it has Routing already) so it doesn’t make a difference

OS: CentOS 7, using Apache

How to list blog post from subdirectory wordpress install to the main site

I have decided to separate my main website and my blog with different WordPress installs. I’ve installed my blog in the subdirectory (/blog/ folder) and my main WordPress is only contained homepage and pages related to my business.

The problem is, is it possible to create a section on my main website that lists 4 latest posts from my blog that are installed in the subdirectory? I have searched all over the internet for the solution, but I’ve found nothing.

Can you tell me how can I solve this?

Redirect to a subdirectory frontpage using without using a WP plugin- what files to edit, and how?

My situation

I have a multisite setup, where I use subdirectories for different languages. I use the main homepage for English and subdirectories for other languages, as follows:

mywesbite.com : English language frontpage

mywebsite.com/jp/ : Japanese language frontpage

What I want to do

I would like to redirect people who live in Japan to the Japanese language ffrontpage without using a WordPress plugin.

What I have tried

Using the geoplugin.com , as inspired by the 3rd answer of this stack I edited the theme header.php file by adding the following at the very beginning

$  a = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$  _SERVER['REMOTE_ADDR'])); $  countrycode= $  a['geoplugin_countryCode']; if ($  countrycode=='JP'){         header( 'Location: https://mywebsite.com/jp/' );         exit;     } 

The problem

However, I get the following error

The page isn’t redirecting properly

An error occurred during a connection to mywebsite.com.

This problem can sometimes be caused by disabling or refusing to accept cookies.

Note: the redirecting works fine with an external website, for example

$  a = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$  _SERVER['REMOTE_ADDR'])); $  countrycode= $  a['geoplugin_countryCode']; if ($  countrycode=='JP'){         header( 'Location: https://anotherwebsite.com' );         exit;     } 

Is there a way to fix this error?

I am also open to other solutions not using a WP plugin.

Aesthetic URL problem: Website from server02 should look like its on a subdirectory of the main site from server01

www.example.com is on server01 with IP address

abc.example.com is on server02 with IP address

I actually do not want the subdomain abc. Ideally I want it at www.example.com/abc. I want to have a more cohesive website for usability and aesthetics. For non-technical people, having the content in a sub-directory feels that you are still on the same site compared to going to a sub-domain.

My problem is that the code for the subdomain site (Site2) is on server02 with a different IP. I cannot use just 1 server for the 2 sites: Site1 is using Apache, MySql, and PHP for PHP websites and static websites. Site 2 is a webapp that uses nginx, ruby and postgresql. Maintenance wise, IMHO, it is easiest to have site02 on a separate server. But as I said, it would be great if it can be visited by the end-user in a sub-directory of the main domain.

Is there a a way for me to achieve this?

What is the correct url syntax for mytheme.css to access items in it’s sub-directory?

The alternative of my gdm3 is installed at /usr/share/gnome-shell/theme/mytheme/mytheme.css. It’s assets directory, which stores all the .svg files, is located at /usr/share/gnome-shell/theme/mytheme/assets. A typical selector in mytheme.css accesses the .svg files in the “assets” directory like so:

.toggle-switch-us {   background-image: url("assets/toggle-off.svg"); }   .toggle-switch-us:checked {     background-image: url("assets/toggle-on.svg"); } 

However, these svg images (and all the other .svg images) do not seem appear in the gnome greeter and unlockscreen.

What is the proper url syntax to declare what I want?

Multi-server – how do I link my WordPress blog to a subdirectory of my static site?

we have a static site example.com (an Azure App Service) that we’ve been running for some time. We would like to use WordPress to start a blog in a subdirectory at example.com/blog. The WordPress instance has been set up using a separate PHP Azure App Service and Azure Database for MySQL Server.

If the browser requests /blog or anything deeper, e.g. /blog/morecontent, what are the steps I need to take to tell the browser that the content lives on a the PHP server. This is of course without URL masking – I’d like search engines to think that the /blog content is part of the example.com hierarchy.

I imagine there are multiple steps to set up here like permanent redirects, DNS, WordPress URL/URI config and more. I’m just a little lost and don’t know where to start, and so I might not be even framing the question correctly.

Any help or direction on where to look is most appreciated! I haven’t found anything on StackExchange yet that covers the static+PHP scenario.