Jump to content

Mod Rewrite apache help


alli14404

Recommended Posts

Hi, I'm having some issues working out how to phrase a certain rule.

 

Basically I want certain folders to act as normal, as my main rule is pretty all encompassing.

 

RewriteEngine On

RewriteRule ^!((rss|assets|forum)/?)$ $2/ [L]

RewriteRule ^([a-z0-9-]+)/?([a-z0-9-]+)?/?([0-9+])?/?$ index.php?1=$1&2=$2&3=$3 [NC]

what I'm attempting with that first rule is that someone who goes to:

 

website.com/rss or website.com/rss/ (an actual directory btw)

ends up at website.com/rss/ (using L flag to make it the last rule)

 

I can't seem to quite get why it wont apply :/

Am using this cheat sheet: http://www.ilovejackdaniels.com/cheat-sheets/mod_rewrite-cheat-sheet/

 

Any help would be greatly appreciated =]

Link to comment
https://forums.phpfreaks.com/topic/91138-mod-rewrite-apache-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.