Jump to content

Check Canonical url


phpnerd

Recommended Posts

This is why people should learn to think instead of wasting there time copying code from tutorials.

 

What do you need to do?

 

1) Get the current url. - The $_SERVER array is the place to look.

2) Check to see if it start with the string 'www'. substr will help you do this.

 

I'm not going to provide the code for you because it won't help you.

Link to comment
https://forums.phpfreaks.com/topic/242620-check-canonical-url/#findComment-1246398
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.