User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Linux Servers and Apache section within the Tech Talk category of DaniWeb, a massive community of 402,395 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,876 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Linux Servers and Apache advertiser: Programming Forums
Views: 1720 | Replies: 1
Join Date: Nov 2004
Posts: 2
Reputation: ukndoit is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ukndoit ukndoit is offline Offline
Newbie Poster

mod_rewrite not working help, please

  #1  
Oct 1st, 2007
Can someone tell me what this code does not work:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/?web
RewriteRule ^/?(.+) /web/$1 [L]

I am trying to get it where if someone visits any file that does NOT exists:
http://www.domain.com/usernameHere
it would just load http://www.domain.com/web/usernameHere
We added the first two conditions so if the page calls an image it should work because the condition would fail, also if they called a directory on the website it would fail because it exists... othe than that everything else should be redirected.

It does not work, do you see any errors?
Thank you.
Richard
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Linux Servers and Apache Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Linux Servers and Apache Forum

All times are GMT -4. The time now is 1:23 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC