htaccess Rewrite Rule duplicate - help me out please / RewriteRule ^(.*)\+apple\+fruit/$ ?q=$1 [L]
I have this code in my .htaccess:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)\+apple\+fruit/$ ?q=$1 [L]
this turns the searchquery in /keyword+apple+fruit/
thats ok.. the only problem is, if I type in /keyword+apple+fruit +any+text+haha+ apple+fruit/ the htacces is showing content - but I don't want that.
is there any command to say - ok apple + fruit only one time in the url and the second time send a 404 or show nothing..
thank y开发者_运维百科ou!!
You can use a RewriteCond
to exclude such a case:
RewriteCond $1 !apple\+fruit
RewriteRule ^(.*)\+apple\+fruit/$ ?q=$1 [L]
精彩评论