Search found 7 matches

by target
Fri Nov 13, 2009 1:45 pm
Forum: PHP - Code
Topic: Function to get URL, but maintains the "www"
Replies: 1
Views: 313

Function to get URL, but maintains the "www"

Does anyone have a PHP function that includes the "www" if it exists?

I need to check for the WWW but all current functions seem to omit the "www" regardless of whether it's there.

Thanks for the help.
by target
Fri Aug 21, 2009 1:50 pm
Forum: PHP - Code
Topic: Mod Rewrite with Question Mark
Replies: 4
Views: 253

Re: Mod Rewrite with Question Mark

I needed to include the hyphen so that argument can contain numbers, letters and hyphen. That part works. It's just the question mark part that has issues.
by target
Fri Aug 21, 2009 12:19 pm
Forum: PHP - Code
Topic: Mod Rewrite with Question Mark
Replies: 4
Views: 253

Mod Rewrite with Question Mark

Hi, I'm trying to do a redirect with Mod Rewrite in .htaccess: RewriteRule ^folder/([0-9]+)-([a-zA-Z0-9\-]+)\?(.*) folder/page.php?id=$1&shortname=$2&$3 [L] So http://mydomain.com/folder/1-word?status=success should rewrite to http://mydomain.com/folder/page.php?id=1&shortname=word&s...
by target
Wed Oct 24, 2007 3:33 pm
Forum: PHP - Code
Topic: CHMOD to protect web files from direct access?
Replies: 17
Views: 2689

So what I'd like to do is have files like FLV Flash Videos inside a directory that is in a "web-accessible" path (http://mysite.com/protected/video.flv) but protected by CHMOD or .htaccess so people can't directly download by just going to the URL, but they can access it from a webpage by ...
by target
Wed Oct 24, 2007 10:03 am
Forum: PHP - Code
Topic: CHMOD to protect web files from direct access?
Replies: 17
Views: 2689

But the question is, if I use .htaccess to protect some images, will HTML pages outside that directory be able to call those images? Or will it prompt them for the login?
by target
Mon Oct 22, 2007 8:37 am
Forum: PHP - Code
Topic: CHMOD to protect web files from direct access?
Replies: 17
Views: 2689

But if I use .htaccess to protect that directory, would my HTML/PHP pages be able to reference protected files through normal <img src="/protected/image.jpg" /> tags?
by target
Thu Oct 18, 2007 9:55 am
Forum: PHP - Code
Topic: CHMOD to protect web files from direct access?
Replies: 17
Views: 2689

CHMOD to protect web files from direct access?

Is it possible to use CHMOD permissions to prevent web users from directly accessing files (like videos and images) but still allow your HTML/PHP pages to access them and serve them up? (Not using a script, just still using <img src="...">) So the files would be in a web-accessible path (p...