Forcing header cache control in 404 pages
Forcing header cache control in 404 pages
Forcing header cache control in 404 pages
check for any malicious code in wp-config.php and other files simple open your wp-content/ and delete the following folder or file that you have not installed or have a name in the wrong format like if it is a real file then it will have a name like wp-config.php if it is miraculous then its … Read more
301 redirect just for 404 to another domain
Here is the right answer : Redirect 301 /register /login-register It works without quotation marks. And no need to use absolute path (the entire address), except if the redirection goes to another domain. If this is your case, do this: Redirect 301 /register https://example.com/login-register Also, I didn’t redirect /wp-login as it caused some issues (inability … Read more
loop_start is too late template_redirect did the trick.
UPDATE : FIXED okay guys I have solved this issue here is my fix 1- first of all you will need access to FTP or C-panel 2- go to public_html > now for this to work plz reset your wp-config.php you can do it by removing unnecessary code, here is a sample wp-config.php (if you … Read more
First, create a page with the intended URL slug and note down the ID of it. Then in your functions.php function wpse410694_custom_redirect() { //Let us assume the ID of the page is 123 if ( is_page(123) ) { wp_redirect( ‘drive.google.com/myCustomPDF_Link’ ); exit; } } add_action( ‘template_redirect’, ‘wpse410694_custom_redirect’); The maximum upload size is normally set from … Read more
Create a 301 Redirect automatically when adding %category% in the permalink
I was able to get it working by adding the following two lines to my .htaccess, right before the rest of the other WordPress rule RewriteCond %{REQUEST_URI} ^/map/(.+)$ [NC] RewriteRule ^(.*)$ /map [L,P] Bottom of my .htaccess with the rules looked like this: RewriteEngine On RewriteCond %{REQUEST_URI} ^/map/(.+)$ [NC] RewriteRule ^(.*)$ /map [L,P] RewriteRule .* … Read more
So it looks like I’ve managed to fix my own problem here. I don’t know if this is the best thinkable solution to this exact problem, but it does work! My assumptions about CURLOPT_FOLLOWLOCATION seem correct. As Sally CJ also explained in the comments, the default setting in WP is always set to false. That’s … Read more