Mod Rewrite Help v2

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Mod Rewrite Help v2

Post by shiznatix »

I am now a bit more expierenced with mod rewrite but I am having a bit of a strange problem. I have a symbolic link folder called poker-forum and I need it to be treated as a folder but it is not happening because of this rule I have:

Code: Select all

RewriteRule ^([a-z_-]+)$ $1.php
RewriteRule ^([a-z_-]+)/$ $1.php
which is no fun because I have another folder that I can directly go to no problem. I have tried this rule to make all poker-forum entries to go to the poker-forum link folder:

Code: Select all

RewriteRule ^poker-forum$ poker-forum/ [QSA]
RewriteRule ^poker-forum/$ poker-forum/ [QSA]
but that does not send anything to the folder.

can anyone give me a little help?
User avatar
Gente
Forum Contributor
Posts: 252
Joined: Wed Jun 13, 2007 9:43 am
Location: Ukraine, Kharkov
Contact:

Post by Gente »

Maybe something like this

Code: Select all

RewriteRule ^poker-forum$ poker-forum/ [L]
RewriteRule ^poker-forum/$ poker-forum/ [L]
RewriteRule ^([a-z_-]+)$ $1.php
RewriteRule ^([a-z_-]+)/$ $1.php
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

the L flag did the trick, thanks
Post Reply