@Yuri, My only guess would be to make sure that the field storing the url is Text Only, and not XHTML, as it could be adding tags to the URL. Otherwise, I can’t imagine why it may not work for you if you have the full URL to the file. You could try calling the {url} before the link just to make sure it contains the value you expect it to.
Yeah that would help wouldn’t it Turns out after going over everything i had xhtml turned on. After turning it off my original code is working. Too much wine i think 😉
Thanks for your help guys.
The site i am using your wonderful code is for my label - Alt Records Another muso here
Well I’m not sure how long Rick has been a muso for but I have been one ever since I was around 4 years old so 30 years for me. Web design for about as long as I care to remember. Pretty much ever since the internet took off really.
We can’t really blame Rick for everything now, can we? 😉
Best wishes,
Mark
Hi there,
@ Brad, thanks a lot for sharing this module. @ Mark, you tutorial is great so thanks for that and the plugin. @ Both, please let me know how can I send you a donation.
Now, quick question… do you know if there might be a problem when using .htaccess to hide index.php? I’m trying this on EE 1.6.3 with MSM but when I click on the links instead of the download all I can see is a blank page…
Rgds
Hiya,
Thanks for the very kind words 😊 There’s no need for a donation unless you really want to 😉 I wrote up that document and released the plugin as free to the ExpressionEngine community so grateful for the kind words I get back on it. Just nice to be able to help other people out whenever I can. All I really want to do in life!
Best wishes,
Mark
Darn and I thought you did mean thousands of pounds, oh well!! 😉
Also don’t drink. Not one of my vices I’m afraid. If you really really really really really really really want to donate something to me then (if it’s okay with you) will put it into my charity fund that I place money into and then send it off when it is of a high enough value.
You can PM me for Paypal details or anything else you like. You don’t have to donate though so no worries if you don’t. I like to help people out on the forums here with anything I can do as people have helped me out in the past so just like to give back whenever I can.
Best wishes,
Mark
Hiya,
Oops sorry missed your post before about the problems you’re having. No problems here with ExpressionEngine 1.6.3 PHP 4.4.4 and removing index.php using this method below :
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
Not sure about MSM though as I have never used that on any sites. Don’t know if that would be related or not.
What is the code you are using to try this out with? Are you using something like this :
<a href="http://{exp:linklocker" title="Download File">Download file…</a>
Obviously change the link to a file on your server but if you place that in a template what URL do you get? If you are removing the index.php part from your URLs using a .htaccess file then you also need to remove the index.php part from :
Admin->System Preferences->General Configuration->Name of your site’s index page
Ensure that is blank and then hopefully it should work?
Don’t know if any of that helps perhaps?
Best wishes,
Mark
Hey mediavilla,
I can’t imagine why you’re getting a blank page when clicking on links. I’ve used it on a site where I rewrite urls to remove index.php. Just make sure that if the files are stored on the same site (ie. have a url of www.thissite.com) that the folder that is being accessed is included in your .htaccess file. For example, if I have an EE site (www.here.com) and my files are in a folder called MP3 (www.here.com/MP3) make sure that this path is allowed in your rewrite rules - for example, if using the “Exclude” rewrite method :
RewriteEngine on
RewriteCond $1 !^(MP3|images|system|themes|favicon\.ico|robots\.txt|index\.php) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]
Also, make sure that the file actually exists and is at the url you are providing - I know it seems obvious, but could be one of those simple things that will bite you. Try to visit the URL of the file in your browser.
Hope that helps. If not, lemme know and we’ll look at other issues. If you’d still like to donate to the project, please PM me and I’ll provide Paypal email.
Thanks
Brad, Mark, I can’t thank you enough for all your time and help… I’ve tried both changes on my .htacess but the problem is still there…
Here is the code:
<
pre>{if logged_in}
{exp:weblog:entries weblog="icebreaker" dynamic="off"}
{exp:scm_entry_access entry_id="{entry_id}"}
You have already purchased this item - <a href="http://{exp:linklocker">Download {cf_ib_zip}</a></p>
<pre><code> {/exp:scm_entry_access}
{/exp:weblog:entries}
{/if}
If you wanna see it with your own eyes you can login here:
Username: test Password: test5
And the page with the links is here: Downloads Area
Maybe related to the Multiple Site Manager??
Thanks again,
Rgds,
Echo the value of {cf_ib_zip} out to the screen - make sure it contains what you expect - I can’t see this with the test account you provided as it has no purchases. Also, make sure that the field type for this is text only, not xhtml. Furthermore, since you are using this as part of the url, make sure it is url encoded (if there are spaces in it, they should be replaced with and so forth).
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.