This repository was archived by the owner on Apr 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 157
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
outline_javascript generating broken links #238
Copy link
Copy link
Closed
Description
What steps will reproduce the problem?
Occurs when mod_rewrite makes the document appear to be in a different
directory and JavaScript is being 'outlined'.
e.g. RewriteRule ^([-a-z]+)/$ /scripts/category.html?shortname=$1
What is the expected output? What do you see instead?
The <script> src generated by the outline_javascript filter is only valid from
the directory where the script is located. From the re-written path the link
is broken (404).
What version of the product are you using (please check X-Mod-Pagespeed
header)?
0.9.16.6-r555
On what operating system?
Debian GNU/Linux
Which version of Apache?
2.2.16
Which MPM?
ModPagespeedDisableFilters inline_css,inline_javascript
ModPagespeedEnableFilters move_css_to_head
ModPagespeedEnableFilters rewrite_css,rewrite_javascript
ModPagespeedEnableFilters outline_css,outline_javascript
Please provide any additional information below, especially a URL or an
HTML file that exhibits the problem.
http://www.capitalwines.com.au/ministry/
<script type="text/javascript"
src="_,Mjo.KT-QvufXb4.js.pagespeed.jm.0nrvg_cYUr.js"></script>
link returns 404 Not Found.
http://www.capitalwines.com.au/scripts/category.html?shortname=ministry
<script type="text/javascript"
src="_,Mjo.KT-QvufXb4.js.pagespeed.jm.0nrvg_cYUr.js"></script>
link works as expected.
So the outlined javascript only works when sourced from:
http://www.capitalwines.com.au/scripts/_,Mjo.KT-QvufXb4.js.pagespeed.jm.0nrvg_cY
Ur.js
But it is instead being sourced from (e.g.):
http://www.capitalwines.com.au/ministry/_,Mjo.KT-QvufXb4.js.pagespeed.jm.0nrvg_c
YUr.js
This behaviour appears to have started with the upgrade to 0.9.16 (not
confirmed).
Original issue reported on code.google.com by dun...@chirp.com.au on 14 Mar 2011 at 10:04
- Blocked on: Wrong document URL when mod_rewrite used #234