News:

Click here for Toll-Free Service for your business starting at $2.00 per month

Main Menu

Mod_Rewrite

Started by Osprey, July 14, 2006, 09:57:58 PM

Previous topic - Next topic

Osprey

Hey Guys, I'm having a little trouble with Mod_Rewrite.. hoping someone can help.

The current code in my .htaccess file:
QuoteRewriteEngine On
RewriteBase /
RewriteRule ^secret/(.*) secret.php?id=$1

Basically, i want domain.com/secret/$number to act as domain/secret.php?id=$number -- I can't see what i've done wrong, i've used similar code elsewhere and it worked fine? Any help much appreciated.

I even stuck a [R] on the end of the rule to try and get it to redirect but that didn't work either.

Osprey

Osprey

#1
I think i've come accross the problem.. i think it's because the page i was using (secrets.php) had the same name as the folder. Is there some kind of overriding HTACCESS preventing it from working? In any case it's okay now i just renamed the secrets.php page.

Osprey

Edit:

Hmm, odd. It wasn't that after all. I'm not sure whats going on but it doesn't like using "secret" as a "false directory" (If that makes sense) but "secrets" is fine. It's annoying because i really wanted secret... i guess i'll keep playing.

Edit2:

Oh yes it was - Wahey! Fixed it.