The Bat Posted August 18, 2007 Share Posted August 18, 2007 I have an .htaccess file which contains RewriteRule and RewriteCond statements. Here is the code (snippets are examples): RewriteCond %{REQUEST_URI} /cat [OR] RewriteRule ^([^/\.]*)/?$ cat.php?kitty=$1 [L] That way when the URL is mysite.com/cat/foo, foo is kitty. The problem is that "kitty" is applied to all pages. I tried adding RewriteCond %{REQUEST_URI} !(/cat) [OR] RewriteRule ^([^/\.]*)/?$ index.php?something=$1 [L] So that if the URL does not end with /cat, "kitty" will be "something". But this does not work. How can I fix this? Thank you! Link to comment https://forums.phpfreaks.com/topic/65573-need-help-with-rewriterule-and-rewritecond/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.