VisioList PHP TopList
OSempire
Old 04-26-2009, 04:37 AM   #1
ramee001
Junior Member
Level 1 Access
Points: 1,006, Level: 1 Points: 1,006, Level: 1 Points: 1,006, Level: 1
Activity: 0% Activity: 0% Activity: 0%
 
ramee001's Avatar
 
Join Date: Apr 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
ramee001 is a jewel in the rough
.htaccess Folder Redirections

Hey everyone! Hopefully this is the right place to post this. I'm trying to work on a redirection for a blog-like script, and I figured .htaccess would be the best way. Every user will have their own link such as mywebsite.com/acooluser and rather than make a folder for each user, I'm going to use the rewrite function.

Now I came into a problem on folders that do exist and can be navigated to, so I wanted code that would skip the folders that exist, but if they didn't exist, it would redirect to the profile page and show that person's information.

Here's what I'm using right now:

Code:
RewriteEngine On

RewriteCond %{REQUEST_FILENAME}	!-d	
RewriteRule ^.*[/]$ 			/purefm_v2/djs.php?did=$1	[NC,L]
The problem is, the RewriteRule never gets called. It's as if all directories exist because it tries to go to a non-existing one and issues a 404 error. Does anyone know what I missed?
ramee001 is offline   Reply With Quote
Old 01-30-2011, 09:02 PM   #2
Kunstkamera
Junior Member
Level 1 Access
Points: 2,636, Level: 1 Points: 2,636, Level: 1 Points: 2,636, Level: 1
Activity: 0% Activity: 0% Activity: 0%
 
Kunstkamera's Avatar
 
Join Date: Apr 2009
Location: Ecuador
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Kunstkamera is a jewel in the rough
Send a message via ICQ to Kunstkamera
htaccess Folder Redirections

I have a question, if I want to restrict the access to a directory, for example, but allow localhost to not be required to enter the user / pass for authentication, thus a link from another script I host, what would the format be like?

My .htaccess file: Code:
Kunstkamera is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


VisioList Demo

Powered by vBulletin Copyright ©2000 - 2014, , Jelsoft Enterprises Ltd