Page is a not externally linkable
jdMorgan - 7:05 pm on Jan 5, 2007 (gmt 0)
I found an optimization to shorten this up. Replace these two rules: Replace all broken pipe "¦" characters in the code above with solid pipes before use; Posting on this forum modifies the pipe characters. Jim
Thanks all, and "hsieh hsieh ni" to codemeit
# Replace comma(s) in page filepaths with period (e.g. "/page,html")
RewriteCond %{ENV:myURI} ^([^,]+),+\.*((s?html?¦php[1-9]?¦pdf¦xls).*)$ [NC]
RewriteRule . - [E=qRed:yes,E=myURI:%1.%2]
#
# Remove multiple filetype delimiter periods (e.g. "/page..html")
RewriteCond %{ENV:myURI} ^([^.]+)\.{2,}((s?html?¦php[1-9]?¦pdf¦xls).*)$ [NC]
RewriteRule . - [E=qRed:yes,E=myURI:%1.%2]
with this one that does both:
# Replace comma(s) or multiple filetype delimiter periods in page filepaths
# with a single period (e.g. "/page,html" or "/page..html")
RewriteCond %{ENV:myURI} ^([^,.]+)([,.]{2,}¦,)((s?html?¦php[1-9]?¦pdf¦xls).*)$ [NC]
RewriteRule . - [E=qRed:yes,E=myURI:%1.%3]
Anything that can be done to make this pile of code smaller and easier to modify/maintain...