07-26-2023, 09:24 PM
I have installed WHMCS in a subdirectory, **domain.com/whmcs**
Now I am moving it into the main domain and I will be using custom pages. However, i don't want to have .PHP extension on the custom pages that I created. **Ex. domain.com/page.php**
I will need to remove .PHP extensions from specific pages and redirect these pages to non .PHP versions.
I just want to double check if this is the right 301 redirect for the search engines, before i publish it:
RewriteEngine on
RewriteRule ^mypage$ mypage.php [L]
Redirect 301 /mypage.php https: //domain.com/mypage
It works perfectly when i type **domain.com/mypage.php** redirects to **domain.com/mypage** But i am not sure if it's the right way to do it for the search engines. Currently i use wordpress in the root domain, so basically, I want to match the same links.
Thanks!
Now I am moving it into the main domain and I will be using custom pages. However, i don't want to have .PHP extension on the custom pages that I created. **Ex. domain.com/page.php**
I will need to remove .PHP extensions from specific pages and redirect these pages to non .PHP versions.
I just want to double check if this is the right 301 redirect for the search engines, before i publish it:
RewriteEngine on
RewriteRule ^mypage$ mypage.php [L]
Redirect 301 /mypage.php https: //domain.com/mypage
It works perfectly when i type **domain.com/mypage.php** redirects to **domain.com/mypage** But i am not sure if it's the right way to do it for the search engines. Currently i use wordpress in the root domain, so basically, I want to match the same links.
Thanks!