Jump to content

adiadi

New Members
  • Posts

    4
  • Joined

  • Last visited

adiadi's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi requinix yes i understand ..my situation is i have 2 version of site where one (A) is an archive and the other one(B) is live site , what im trying to do is put cross domain canonical on archive site (A) to B ..while on B site the canonical tags is self refencing..and thank to @maxxd ..it seems everything goes as i wanted to ..now i just need to test if there's some error or something like that
  2. yes i understand its already on php ...im just trying to explain what im trying to do (http header output )..im totally blind with php , obviously the syntax are not formatted correctly but it seems the modification isn't that heavy so im trying to figure it out by my own....and thank you this one actually does the job header('link: <https://example.com/'.$_SERVER['REQUEST_URI'].'>; rel="canonical"');
  3. the link header output was suppose to be printed like this Server: Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.5.15 X-Powered-By: PHP/5.5.15 Link: < https://forums.phpfreaks.com/topic/315218-get-current-url/ >; rel="canonical" HTTP2-Settings: HTTP2-Settings: xxxxxxx Content-Length: 201077 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/pdf
  4. hi i have piece of php code that i need help to modify, its a http header status control for download page // Stream the file to the end user. header("Content-Type: $mediaType"); header('HTTP2-Settings: HTTP2-Settings: xxxxxxx '); header('Content-Length: ' . filesize($filePath)); //header('Content-Disposition: ' . ($inline ? 'inline' : 'attachment') . "; filename=\"$fileName\""); i need to add header link rel canonical for current url (dynamic download page url) // Stream the file to the end user. header("Content-Type: $mediaType"); header('link: < https://example.com<?php echo ($_SERVER['REQUEST_URI']); ?>>; rel="canonical"'); header('HTTP2-Settings: HTTP2-Settings: xxxxxxx '); header('Content-Length: ' . filesize($filePath)); //header('Content-Disposition: ' . ($inline ? 'inline' : 'attachment') . "; filename=\"$fileName\""); but it doesnt work, it gave me Parse error: syntax error, unexpected 'REQUEST_URI' (T_STRING) in xxx on line 260 can someone help me? thank you
×
×
  • 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.