Forum Moderators: phranque

Message Too Old, No Replies

What does it mean a localized URL-path and protocol plus canonical?

         

toplisek

8:57 am on Apr 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What does it mean a localized URL-path and protocol plus canonical?

jdMorgan

5:00 pm on Apr 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Basic answer:

URL-path: /blog/index.php

Protocol plus canonical URL: http;//www.example.com/blog/index.php


Details:

In addition, when speaking of localized URL-paths in mod_rewrite in a per-directory context (e.g. within .htaccess files), what we mean is that the URL-paths tested by RewriteRule are localized to the the current .htaccess file's directory. For example, if you want to match a request for the URL "example.com/foo/bar/page" and rewrite it to a script residing at filepath "/index.cgi", the code would be different depending on which .htaccess file you put it into:

Code in example.com/.htaccess:
RewriteRule ^foo/bar/page /index.cgi [L]

Code in example.com/foo/.htaccess:
RewriteRule ^bar/page /index.cgi [L]

Code in example.com/foo/bar/.htaccess:
RewriteRule ^page /index.cgi [L]

Thus the URL-path matched by the RewriteRule is "localized" to the current .htaccess file's directory, and the RewriteRule pattern must be adjusted to match the localized URL-path.

Jim

toplisek

7:49 am on Apr 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thank you.
So,
Protocol is http://www.example.com
canonical URL is :/blog/index.php

jdMorgan

6:29 pm on Apr 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Canonical URL is http://www.example.com/blog/index.php
Protocol is "http"
Hostname is "www.example.com"
Domain is "example.com"
Subdomain is "www"
URL-path is "/blog/index.php"
Localized URL-path in example.com/.htaccess is "blog/index.php"
Localized URL-path in example.com/blog/.htaccess is "index.php"

All of these terms have very-specific meanings, and should be used carefully.

Jim