Remove site root trailing slash
add this line to functions.php remove_filter(‘template_redirect’, ‘redirect_canonical’); and don’t forget clear cache or test on clean browser
add this line to functions.php remove_filter(‘template_redirect’, ‘redirect_canonical’); and don’t forget clear cache or test on clean browser
Correct me if I’m wrong, but far as I know, You don’t access directly to any of the files, the apache user does. Meaning, the user browser talks to the server’s httpd process which will get the file from the filesystem. So, i think that if you get a 404 on the browser when directly … Read more
The issue is that the browser doesn’t pass the hash value in the request, it is parsed by the browser itself. Since the server doesn’t know about the hash it can’t forward it along after the login. You do have access to the hash with javascript though…Without seeing your code I can’t give you a … Read more
If you can access your page at http://example/wordpress/page2, then use the following code to output a link to your page, no matter what your site url is: echo site_url(‘/page2/’); This appends the /page2/ to your website’s url (which is http://example/wordpress/ ), which would be : http://example/wordpress/page2/
Allow UTF-8 characters in the user slug part of URL
Best way of removing emoji support from url / slug only
How can I change all links on pages to point to a different domain from where the site is hosted?
We managed this by hijacking the default author template and setting up our own. Set up a new url rewrite for team members: add_action(‘init’, function () { global $wp_rewrite; $wp_rewrite->author_base=”team”; $wp_rewrite->author_structure=”https://wordpress.stackexchange.com/” . $wp_rewrite->author_base. ‘/%author%’; }); In the template we then use: $uid = get_query_var(‘author’); to get the user’s id. From there you can build out … Read more
What you’re trying to do is called Domain Masking. There are several ways to achieve this, but they are not easy. There is a plugin in the repo that seems to be able to do content masking right from within the dashboard, but I have never tested it. My initial intuition would be to do … Read more
The pattern you posted… www.mydomain.com/image.jpg(‘custom-thumb’); … is a bit odd. That would be pretty tricky. You’d need a PHP handler to load the image and you’d need to tell the server (Apache, Nginx, IIS, Whatever) to parse that file ending as PHP. Something like this would be simpler: www.mydomain.com/image.php?size=custom-thumb You would still need to create … Read more