•
•
•
•
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 425,934 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 1,635 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: 1807 | Replies: 1
![]() |
| |
•
•
Join Date: Nov 2004
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Can someone tell me what this code does not work:
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
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
![]() |
•
•
•
•
•
•
•
•
DaniWeb Linux Servers and Apache Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
apple bbc cellphone choose code computer core debian dell desktop development drivers enterprise fedora fiji games gentoo gpl hardware ibm install intel kernel laptop linux marketing microsoft mobile news novell open open source openoffice operating os preinstall red hat rhel security server source sun suse system ubuntu unix vista web windows x86
- mod_rewrite now workign in Apace , windows. please give me pointer (PHP)
- vBulletin mod_rewrite (PHP)
- [Revised] vBulletin Mod_rewrite Tutorial (PHP)
- vBulletin mod_rewrite for vB 3.0.7 (Existing Scripts)
- mod_rewrite (Linux Servers and Apache)
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: Asp on apache
- Next Thread: Apache


Hybrid Mode