![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Filesystems, Disks and Memory Questions involving NAS, SAN, RAID, Robotic Libraries, backups, etc go here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Symlinks | ct1977 | UNIX for Dummies Questions & Answers | 1 | 02-21-2008 03:15 PM |
| Nested Symlinks? | deckard | Shell Programming and Scripting | 0 | 09-07-2007 12:07 PM |
| search and replace symlinks | nixrock | UNIX for Advanced & Expert Users | 2 | 10-19-2005 02:25 PM |
| .htaccess | Avenger | UNIX for Dummies Questions & Answers | 3 | 04-12-2002 08:49 AM |
| .htaccess? | Puc conDoin | UNIX for Dummies Questions & Answers | 1 | 05-28-2001 05:58 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#22
|
||||
|
||||
|
add this line to turn on max verbosity on rewrites.
Code:
RewriteLogLevel 9 |
| Forum Sponsor | ||
|
|
|
#23
|
||||
|
||||
|
Quote:
|
|
#24
|
|||
|
|||
|
I GOT IT TO WORK!!! SWEET, but please tell me if you see a glitch in this: Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !^/web/(.*)
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-f
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-d
RewriteRule ^(.+) http://www.ourdomain.com/web$1 [R]
http://www.ourdomain.com/web/username and everything loads just fine!! when I go to http://www.ourdomain.com/css it loads the index of the css just fine but the images still do not show on there, but they do if I just go the main domain so I don't care. however, when I go to http://www.ourdomain.com/images I get redirected to http://www.ourdomain.com/web/403.shtml lol, I don't know why that happens, but could it be because images is a symlink to the main websites images directory?? I don't know. But anyhow do you see any glitches or a way that could be broken? thank you so much for ALL your help. I could not have done it without you. Richard Quote:
|
|
#25
|
||||
|
||||
|
It is in fact bacuse of the symlink:
Code:
RewriteCond %{REQUEST_FILENAME} !^/web
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-f
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-d
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-l
RewriteRule ^(.+) http://www.ourdomain.com/web$1 [R]
|
|
#26
|
|||
|
|||
|
Yeah, at first I did not put the domain name in there and it redirected them to http://mydomain.com/web/username
instead of the http://www.mydomain.com/web/username I guess it does not matter if it has www. or not, but the secure pages do, because we have the ssl cert setup as www.domain.com not just domain.com. Thanks again for everything. Richard Quote:
|
|
#27
|
||||
|
||||
|
That should be your first redirection rule in that case.
Code:
RewriteCond %{HTTP_HOST} !^www\.mydomain\.com
RewriteRule (.*) http://www.mydomain.com/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !^/web
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-f
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-d
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-l
RewriteRule ^(.+) /web$1
|
|
#28
|
|||
|
|||
|
Quote:
How can I check the database on the fly to see if a username is even legit and redirect only if it is, and otherwise redirect somewhere else? Do you know where I can see an example of this? I'd really appreciate it. I am totally in love with this mod_rewrite, I cannot believe how much better it is then using .htaccess PER USER!! Wow, what power! Thank you so very very much. Richard |
|||
| Google The UNIX and Linux Forums |