Trim URLs stripping http:

45 views
Skip to first unread message

Alex

unread,
Jun 30, 2011, 2:53:05 PM6/30/11
to mod-pagespeed-discuss
http://code.google.com/speed/page-speed/docs/filter-trim-urls.html

I see in the above documentation that external URLs with 'http:' on
the beginning are trimmed to '//external.tld'. While users browsing
my site are correctly redirected to the external site, wordpress'
internal error checking is catching them as invalid links.

Can someone explain why trimming was done in this fashion and let me
know if there is a config option to turn it off?

Thanks.

Naomi Forman

unread,
Jun 30, 2011, 2:59:08 PM6/30/11
to mod-pagesp...@googlegroups.com
The trimming was done this way so as to make all urls as short as possible, thereby saving some bytes.  It's unfortunate that wordpress has this behavior, since according to spec those links are valid.  Thank you for letting us know about the problem.

The option to turn it off is to add:

ModPagespeedDisableFilters trim_urls

to your .htaccess or pagespeed.conf file.

-Naomi

Alex

unread,
Jun 30, 2011, 3:40:37 PM6/30/11
to mod-pagespeed-discuss
Thanks for the info. Setting the option fixed the links so now
wordpress isn't flagging them as invalid.

I guess I'll see if I can file a bug with the Wordpress team.

-- Alex

Richard Rabbat

unread,
Jul 3, 2011, 11:50:29 AM7/3/11
to mod-pagesp...@googlegroups.com
Alex,

but the issue is not in wordpress. Have you had more luck figuring out the culprit?
--
Richard Rabbat | Product Manager | Google, Inc.
E: rab...@google.com | M: +1-650-714-7618 | Google Voice: +1-617-213-0819
Reply all
Reply to author
Forward
0 new messages