Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 330 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
301 redirects on WHMCS

#1
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!
Reply

#2
Just use this to redirect `xyz.php` to `xyz`:
```
Redirect 301 /xyz.php /xyz
```

As far as I know about search engines, its better to use a `302` redirect to avoid a '*permanent*' issue.


Make sure that `/xyz` actually shows a valid page. So that you do not mess up with the search engines due to a simple mistake like that.

In your example, you use both [mod_rewrite](

[To see links please register here]

) and [mod_alias](

[To see links please register here]

). One of them is enough.
- `RewriteCond`, `RewriteRule`... are from [mod_rewrite](

[To see links please register here]

)
- `Redirect`, `RedirectMatch`... are from [mod_alias](

[To see links please register here]

)

Always, test it once before working on a production server.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through