Welcome to WebmasterWorld Guest from 174.129.127.214

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

RewriteRule fix

   
3:11 pm on Jan 3, 2011 (gmt 0)

10+ Year Member



hello,

I have this rewrite rule from above, the links will open as: domain.com/question/question/title

RewriteRule question/(.*)/title/(.*) question.php?question=$1&title=$2
RewriteRule question/(.*)/title/(.*)/ question.php?question=$1&title=$2


How to make the links show like:

domain.com/question/title ?

Regards,
Dan
3:33 pm on Jan 3, 2011 (gmt 0)

WebmasterWorld Senior Member wilderness is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Basic same question just two days ago [webmasterworld.com] and active thread.
11:21 pm on Jan 3, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



The (.*) patterns will be problematical. Change them to be something more restrictive.

Add the [L] flag to both rules,

See the other thread for other issues.
7:08 pm on Jan 5, 2011 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



If more-specific subpatterns are used, then only one rule is needed:

RewriteRule ^question/([^/]+)/title/([^/]+)/?$ question.php?question=$1&title=$2

Jim