I am trying to redirect wordpress default login (wp-logiin.php) url to signin but somehow it is not working. I have never done this .htaccess rewrite rule before so no idea how it works.
# BEGIN WordPress
RewriteRule ^signin$ http://localhost/newsite/wp-login.php [NC,L,R]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /newsite/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /newsite/index.php [L]
</IfModule>
# END WordPress
Big Big thanks
Try to read manual 🙂
http://httpd.apache.org/docs/current/mod/mod_rewrite.html
First of all, if you want to use “rewrite”, condition must be defined first, followed by rule which is used if is condition met. For example:
Use of RewriteRule without defined RuleCondition, thus IMHO this rule will not be used, never.
As say manual “Pattern is a perl compatible regular expression.”, thus single “.” as pattern mean one single character. So, if request filename will be “test.txt”, it will replace every letter with “/newsite/index.php” (8 chars = 8x repeat).
Correct version is: RewriteRule ^.*$ /newsite/index.php [L]