Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Mod rewrite

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Next:  mod rewrite problem  
Author Message
blackdragon300

External


Since: Dec 21, 2003
Posts: 2



(Msg. 1) Posted: Sun Dec 21, 2003 10:13 pm
Post subject: Mod rewrite
Archived from groups: alt>apache>configuration (more info?)

Hallo,

I have write in a .htaccess File something like this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?.*?
index.php?show=$1&s2=$2&s3=$3&s4=$4 [L]


I want to show Directories but no files, but if remove "RewriteCond
%{REQUEST_FILENAME} !-f" it is the same if i remove the .htaccess file: The
rewriteRule is't use. I don't understand why.

and what i have do do if i wants to do exemptions for same Files?


Thanks. Michael

 >> Stay informed about: Mod rewrite 
Back to top
Login to vote
mfuhr

External


Since: Nov 17, 2003
Posts: 44



(Msg. 2) Posted: Mon Dec 22, 2003 12:06 am
Post subject: Re: Mod rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Michael Korn" <blackdragon3001 RemoveThis @hotmail.com> writes:

 > I have write in a .htaccess File something like this:
 >
 > RewriteEngine On
 > RewriteCond %{REQUEST_FILENAME} !-d
 > RewriteCond %{REQUEST_FILENAME} !-f
 > RewriteRule ^([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?.*?
 > index.php?show=$1&s2=$2&s3=$3&s4=$4 [L]
 >
 > I want to show Directories but no files, but if remove "RewriteCond
 > %{REQUEST_FILENAME} !-f" it is the same if i remove the .htaccess file: The
 > rewriteRule is't use. I don't understand why.
 >
 > and what i have do do if i wants to do exemptions for same Files?

Could you explain in more detail what you're trying to do and what's
happening? I don't quite understand what you're asking.

--
Michael Fuhr
<a style='text-decoration: underline;' href="http://www.fuhr.org/~mfuhr/" target="_blank">http://www.fuhr.org/~mfuhr/</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Mod rewrite 
Back to top
Login to vote
blackdragon300

External


Since: Dec 21, 2003
Posts: 2



(Msg. 3) Posted: Mon Dec 22, 2003 3:17 pm
Post subject: Re: Mod rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > Could you explain in more detail what you're trying to do and what's
 > happening? I don't quite understand what you're asking.
 >

sorry, my bad english!

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?.*?
index.php?show=$1&s2=$2&s3=$3&s4=$4&s5=$5 [L]

this works!
ich I want to see this URL: hallo/test/support/
I get: index.php?show=hallo&s2=test&s3=support

but the problem is that everybody can start the fils directly (for example:
support.php)
so I have do remove "RewriteCond %{REQUEST_FILENAME} !-f"
then I have:

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?.*?
index.php?show=$1&s2=$2&s3=$3&s4=$4&s5=$5 [L]

but if I now want to see hallo/test/support/
I get: index.php?show=&s2=&s3=<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Mod rewrite 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]