The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > Filesystems, Disks and Memory
Google UNIX.COM


Filesystems, Disks and Memory Questions involving NAS, SAN, RAID, Robotic Libraries, backups, etc go here.

More UNIX and Linux Forum Topics You Might Find Helpful
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

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #15  
Old 09-27-2007
reborg's Avatar
Administrator
 

Join Date: Mar 2005
Location: Ireland
Posts: 3,588
Code:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/?members
RewriteRule ^/?(.+) /members/$1 [L]
Reply With Quote
Forum Sponsor
  #16  
Old 09-27-2007
Registered User
 

Join Date: Sep 2007
Posts: 19
Quote:
Originally Posted by reborg View Post
Code:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/?members
RewriteRule ^/?(.+) /members/$1 [L]
Wow, you are the man, thank you for doing that! It did not work, but I appreciate you putting that much time into that. Wow. Over and beyond.

I still get a failed load, when I just load the domain name it does not show the home page, rather the index of the page and no icons when I click on the index.html file it gets a page cannot be displayed error.

Back to the drawing board, I think I will try explicitly try defining each file that is there and make sure it is not the one called. or something.

What do you think?
Richard
Reply With Quote
  #17  
Old 10-01-2007
Registered User
 

Join Date: Sep 2007
Posts: 19
Ok, I tried this both in the .htaccess file and in the httpd.conf file in the <VirtualHost ip> tag, and I tried it this way, in both places:



Code:
RewriteEngine on

RewriteCond %{ENV:REQUEST_FILENAME} !-f
RewriteCond %{ENV:REQUEST_FILENAME} !-d
RewriteCond %{ENV:REQUEST_URI} !^/?members
RewriteRule ^/?(.+) /members/$1 [L]
But every way, it fails to redirect and I just get a page cannot be displayed file.
Any more ideas?
Is there something extra I need to do, do I need to allow mod_rewrite somewhere above in the httpd.conf file, like a module or something?

Thanks.
Richard

PS> Also with the above mentioned code, when I load the main url, instead of the index listing of everything in the directory, I get a page cannot be found(404) error. Strange.
Reply With Quote
  #18  
Old 10-01-2007
Registered User
 

Join Date: Sep 2007
Posts: 19
Ok, I went and looked over my httpd.conf file and I do see the modules already loaded:

LoadModule rewrite_module libexec/mod_rewrite.so
and
AddModule mod_rewrite.c

Since those are there, why would this not work?

Thanks,
Richard

Quote:
Originally Posted by ukndoit View Post
Ok, I tried this both in the .htaccess file and in the httpd.conf file in the <VirtualHost ip> tag, and I tried it this way, in both places:



Code:
RewriteEngine on

RewriteCond %{ENV:REQUEST_FILENAME} !-f
RewriteCond %{ENV:REQUEST_FILENAME} !-d
RewriteCond %{ENV:REQUEST_URI} !^/?members
RewriteRule ^/?(.+) /members/$1 [L]
But every way, it fails to redirect and I just get a page cannot be displayed file.
Any more ideas?
Is there something extra I need to do, do I need to allow mod_rewrite somewhere above in the httpd.conf file, like a module or something?

Thanks.
Richard

PS> Also with the above mentioned code, when I load the main url, instead of the index listing of everything in the directory, I get a page cannot be found(404) error. Strange.
Reply With Quote
  #19  
Old 10-01-2007
reborg's Avatar
Administrator
 

Join Date: Mar 2005
Location: Ireland
Posts: 3,588
Quote:
Originally Posted by reborg
Code:
RewriteEngine on

RewriteCond %{ENV:REQUEST_FILENAME} !-f
RewriteCond %{ENV:REQUEST_FILENAME} !-d
RewriteCond %{ENV:REQUEST_URI} !^/?members
RewriteRule ^/?(.+) /members/$1 [L]
Somehow I changed this without intending to, the ENV: should not be there, you could try this:

Code:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{EQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/?members
RewriteRule ^/?(.+) /members/$1 [L]
Reply With Quote
  #20  
Old 10-01-2007
Registered User
 

Join Date: Sep 2007
Posts: 19
Yeah I added the ENV: based on the documentation, just to try it, but it does not work either way.

With this:
(I changed the system over the weekend, the directory is now /web instead of members)
Code:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{EQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/?web
RewriteRule ^/?(.+) /web/$1 [L]
It still does not work, I can load pages with http://www.mydom.com/web/usernamehere/filename.html
that does work, but images will not show, I get placeholder spots with red x's in them...

Is there perhaps something in the link killing the images?
when I go to:
http://www.mydom.com/usernamehere
I still get a page not found instead of redirecting the file loaded to /web/usernamehere

I'm baffled and lost

Anything further you notice?
(again thank you for all the help, I'm learning )
Richard


Quote:
Originally Posted by reborg View Post
Somehow I changed this without intending to, the ENV: should not be there, you could try this:

Code:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{EQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/?members
RewriteRule ^/?(.+) /members/$1 [L]
Reply With Quote
  #21  
Old 10-01-2007
Registered User
 

Join Date: Sep 2007
Posts: 19
I turned on the rewrite log to see what is happening:

Code:
AddModule mod_rewrite.c
RewriteLog "/usr/local/apache/logs/rewrite.log"
and the rewrite.log is there, but is empty. it is like this rewrite does not even get executed...

any ideas?
Richard
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0