Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

.htaccess issue / wordpress homepage redirecting none of other pages are

Featured Replies

Hello
I have installed wordpress in a directory 'test-admin' (mydomain.co.uk/test-admin), unfortunately when I go to that it is redirecting to my 'newdomain' which I don't want it to, none of the other pages are redirecting, they all work fine.
In the 'test-admin' directory I have the following htaccess:

RewriteEngine On
RewriteBase /test-site/
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
AuthName "test-site"

In the main public html directory I have this htaccess:


RewriteEngine on
RewriteRule ^(test-site) - [L]
RewriteCond %{HTTP_HOST} ^mydomain.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.mydomain.co.uk$
RewriteRule ^/?$ "http\:\/\/newdomain\.com" [R=301,L]

<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>

So everything on my public html in 'mydomain' i wish to redirect to 'newdomain' except for the 'test-admin' folder....this is working apart from the home page in the test admin folder

 

Any ideas what I have done wrong? It is wordpress multisite installed in 'test-admin'...latest wp version.

Many thanks in advance

Edited by protest

  • Author

All fixed, no idea what the issue was, but going into wp dashboard and clicking in homepage and clicking in customisation, although no changes made, seemed to fix it. very bizarre

You've stated 'test-admin' and your htaccess rewrites base as "RewriteBase /test-site/".

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.