General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 26th, 2003, 01:55 PM
sZen sZen is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 3 sZen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ModRewrite

Sorry if this a bad forum

In .htaccess file i have:

Code:
RewriteEngine On
RewriteRule ^test/(.*)/(.*).php /test.php?action=$1&ok=$2


and in test.php file i have:
PHP Code:
<?
if ($action == "oc") {
echo 
"hello";
}
if ((
$action == "oc")  AND ($ok == "yes")) {
echo 
"hello again";
}
?>


When i'm going to:
URL
it's show: hello hello again (and this is good)
but when i'm going to:
URL
then it's show 404 error why??
but when i'm going to:
URL
then it's show: hello
and for me this is bad becouse i want that URL
shows hello

Last edited by sZen : August 26th, 2003 at 02:00 PM.

Reply With Quote
  #2  
Old August 26th, 2003, 06:42 PM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
Understand that I did not test this, but, at first glance I think you need to take into consideration your two scenarios by adding this second rule:

Code:
RewriteRule ^test/(.*).php /test.php?action=$1
__________________
__________________________________________________ _
Wil Moore III, MCP | Integrations Specialist | Senior Consultant
Are You Listed...? | DigitallySmooth Inc.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > ModRewrite


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT