Please login or register.

Login with username, password and session length
Advanced search  


You need/want an older version of sNews ? Download an older/unsupported version here.

Pages: 1 [2] 3 4 ... 10
 on: March 16, 2013, 12:10:18 pm 
Started by sibas - Last post by sibas
Well I found this link where explains exactly what I have to do,
read the Moving path information to a query string
the simplest possible rule is
RewriteRule ^/files/([^/]*) /dl.php?f=$1 [PT]
but no luck, link http :// leads to 404
does not execute the script
any idea?

 on: March 16, 2013, 11:13:55 am 
Started by sibas - Last post by sibas
unfortunately for some files must count the downloads, thats why I have to use the dl.php
now, when it comes to allow users download from some script you need some security,
making a simple rewriting hides the script name from some scriptkids and looks a better link.

 on: March 15, 2013, 08:10:06 pm 
Started by sibas - Last post by Keyrocks
I can't understand why you'd want to get into having to write a rule to conver a link to a static PDF file.
All you need to do is upload the file to your host server's domain root (or a folder in it) and make the link to it.
It's also important to make sure the file-name has no spaces between words in it. I've experienced a lot of problems with clients uploading files with improper file-name structure and not being able to link to or - even - find them because the server sees them as being corrupt files.

If you have a file named file1.pdf and you upload it to your domain root, the link to it would be:
If you uploaded it to a folder in your domain root called pdf, the link to it would be:

It can't get any simpler than that.  8)

 on: March 15, 2013, 03:43:31 pm 
Started by sibas - Last post by sibas
Hi Fred you are right is not possible the above not only for the reason you say..

what I was try to do is to change the link
<a href="http://>file1.pdf</a>
in to
<a href="http://>file1.pdf</a>

my mistake

But if I have this link
<a href="http://>file1.pdf</a>

and make rewriterule to catch the word "files" and return dl.php?f=
I think maybe is going to work..

 on: March 15, 2013, 03:37:08 pm 
Started by sibas - Last post by Fred K
I may be completely wrong but

a) I don't think returning "dl.php?f=" from some function will make a difference, and
b) The link is (I think) treated by sNews the same as any other link, so
RewriteRule ^files/([^/]+).pdf dl.php?f=$1 [NC]
won't work - i.e is (probably) cancelled by the
RewriteRule ^(.*)$ index.php?category=$1 [L] line.

How to solve it? Woush, I have no idea. Sorry.

 on: March 15, 2013, 11:22:27 am 
Started by sibas - Last post by sibas
Hmm I lost you here!!

I follow this rewrite rule
RewriteRule ^files/([^/]+).pdf dl.php?f=$1 [NC]

where I take it from
the above is wrong url

Nothing so far and I am not sure if is possible to make this rewrite
the link is manual generated i.e.

foreach($files_array as $key=>$val){
echo '<li><a href="dl.php?f='.urlencode($val).'">'.$val.'

perhaps to make it work is to return the dl.php?f= from some function?

 on: March 15, 2013, 10:46:34 am 
Started by matthiasrawles - Last post by nukpana
Pat, I would double check to make sure you don't have a space when you are entering in the hashed 'test' string.  Even better may be to delete the 2 setting lines and re-insert via sql:
Code: [Select]
INSERT INTO `settings` VALUES (27, 'username', '098f6bcd4621d373cade4e832627b4f6');
INSERT INTO `settings` VALUES (28, 'password', '098f6bcd4621d373cade4e832627b4f6');

 on: March 15, 2013, 10:39:01 am 
Started by sibas - Last post by nukpana
If you are using this with sNews, you may need to add "files" to the SEF catlist, then do the processing. I don' think you need to work with rewrite.

 on: March 15, 2013, 09:27:03 am 
Started by sibas - Last post by sibas
Hi there

I have this link

I try to make it appear like this

but I have no luck so far
here is some rewriterules that I have try

RewriteEngine On
#RewriteBase /sNews17
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?category=$1 [L]

#RewriteRule ^files/([0-9]+)/?$ dl.php?f=$1 [NC,L]
#RewriteRule ^files/(.*)$ dl.php?f=$1.pdf [NC,L]
#RewriteRule ^files/([0-9]+)-([a-z]+) /dl.php?f=$1.pdf [NC]
RewriteRule ^files/([A-Za-z0-9-]+)/?$ dl.php?f=$1 [NC,L]

Any idea about?

 on: March 14, 2013, 05:52:19 pm 
Started by matthiasrawles - Last post by Patric Ahlqvist
Yo, D... thanks, although never really left ;) Just haven't been active at all, nor will I since my new (sorta) job is quite demanding. This problem is due to an old pal who's website I did, way back, had a problem and I thought I would fix it in a hurry as it only is about changing the strings in the DB.... NOT !!!

Ah, well... Still hoping for a friendly soul to assist me, and possibly some other bugger not being able to change/reset/renew passwords via DB string changes...

Pages: 1 [2] 3 4 ... 10