Problem with change url for all subpages (.htaccess)
Problem with change url for all subpages (.htaccess)
Problem with change url for all subpages (.htaccess)
Wrong Redirect/Rewrite Rules?
The main issue or problem is that it redirects me to example.com/website/ By default Apache (mod_dir) will “fix” the URL with a 301 redirect to append the trailing slash if it is omitted from a filesystem directory. This is necessary for other Apache features to function correctly… without the trailing slash, the DirectoryIndex document is … Read more
Try it like this: RewriteCond %{HTTP_USER_AGENT} (ADmantX|Proximic|Barkrowler|X-Middleton) [NC] RewriteRule ^ – [F] This will block any request where the User-Agent string contains either ADmantX, Proximic, Barkrowler or X-Middleton. The NC flag makes this a case-insensitive match – whether this is strictly required or not in this example I don’t know, but generally this should be … Read more
Rewrite custom post type URL parameters
Try something like the following at the top of the root .htaccess file, before the existing WordPress directives (before the # BEGIN WordPress comment marker): RewriteCond $2 !^(index\.php)?$ RewriteRule ^(subfolder)/(.+) /$1/index.php?path=$2 [L] The RewriteCond directive is to ensure that it doesn’t try to rewrite requests for index.php itself (or the directory). A request for /subfolder/ … Read more
RewriteCond %{REQUEST_URI} ^post/tag/ RewriteRule .* – [F] The REQUEST_URI server var does start with a slash (it is a full root-relative URL-path), although you do say you have tried this “with and without the leading slash”, so this should have worked if that is what you are referring to and /post is the first path-segment … Read more
not sure if this is a problem for you still or not, but if so I noticed a few issues. First off, your domain wasn’t set to be case-insensitive [NC]. Second, your RewriteRule regex has a character class ending with a dash. This needs to start with a dash. Third, your rule sends the request … Read more
Ozh has a great tutorial about pretty login URLs, that you might find helpful – Pretty Login URL: a Simple Rewrite API Plugin Example
After banging my head on this for a few days, I found a solution that works. Just add the following to wp-config.php: if ( isset( $_SERVER[‘HTTP_X_FORWARDED_HOST’] ) ) { $_SERVER[‘HTTP_HOST’] = $_SERVER[‘HTTP_X_FORWARDED_HOST’]; } This will force WordPress to use the requested domain, instead of the proxy domain.