Multisite without .htaccess

e.g. wpinstance.com/wp-admin is not rewritten into wp-admin/ with a trailing slash, but into ugly long link: https://wpinstance.com/wp-login.php?redirect_to=https%3A%2F%2Fwpinstance.com%2Fwp-admin%2F&reauth=1 As is already mentioned in comments, this is intentional. There is no “pretty” URL for this. And neither does there need to be – this should not be indexed or linked to. do I need .htaccess? No, you … Read more

Rewrite WordPress Custom URL

WordPress has its own system managing redirects and page routes, you don’t need to edit the .htaccess file. You’ll want to start with the function add_rewrite_rule(). It takes 3 arguments: route (as regex) query vars priority So first, you need to find out the query vars of account/customer-bookings/. If it is a page, it can … Read more

Call to undefined function insert_with_markers

Looks like insert_with_markers() function becomes available during admin_init hook. So in order for your code to work, you should do the following: function do_my_htaccess_stuff_371705() { //function `insert_with_markers()` is working now } add_action(‘admin_init’, ‘do_my_htaccess_stuff_371705’);

WordPress multisite htaccess

I’ve been looking for details on why that line is suggested for a multisite install using subdomains as well. I actually question if both of these are relevant for a subdomain install: RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] In a sub-directory install the rules are setup slightly different to strip the sub-directory name … Read more

How to do 301 redirect to Sub page using htaccess file?

Redirect 301 /services /services/service-1 This results in a redirect loop because the mod_alias Redirect directive is prefix matching. So, the source path /services matches the redirected path /services/services-1, etc. etc. However, since you are already using mod_rewrite (as part of WordPress), you should also perform this redirect using mod_rewrite (as opposed to mod_alias). Different modules … Read more