How to put RewriteRule create by Mime::add_redirect to top of .htaccess
How to change position of RewriteRule in .htaccess
I have call UAPI to redirect customer website if that matched my rules, but I have a problem that if in .htaccess my customer have rule with [L], my directive can not process.
How can i change position of directive block created by Mime:add_redirect to top of .htaccess
Thanks!
-
Hello, Could you provide an example of what the .htaccess file looks like before adding the redirect? Thank you. 0 -
Yes, it like that, just default .htaccess of Wordpress do You have solution to add redirect rule to top of .htaccess or we need copy old .htaccess to .htaccess.current and write new .htaccess to hosting. Thanks! # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress0 -
Hello, It's not possible to alter the position of the Mod_Rewrite rules added when setting up a new redirect through cPanel. You'd need to setup your custom script to add those custom rewrite rules back in the position you need them in. I encourage you to open a feature request if you'd like to see more functionality regarding how redirects are configured through cPanel: Submit A Feature Request Thank you. 0 -
Thank you Michael 0
Please sign in to leave a comment.
Comments
4 comments