URL rewriting with "+" sign (same as Google+) . htaccess

Asked

Viewed 211 times

3

I’d like to write a rule in . htaccess with Rewriterule using the plus sign (+) for a Google-like url, like this:

meusite.com.br/+alguem be interpreted meusite.com.br/? track=someone or meusite.com.br/umapagina+alguem be interpreted meusite.com.br/a page? track=someone

Thanks in advance for the help.

1 answer

2


RewriteEngine on
RewriteBase /
RewriteRule ^\+(.*)$ /?track=$1 [L]
RewriteRule ^(.*)\+(.*)$ /$1?track=$2 [L]
  • Friend if I could give 1000 stars for the answer. Thank you very much!

  • You’re welcome. The important thing is that it worked. It’s basically just a regular expression.

  • Diego, could you help me with this other question please: http://answall.com/questions/98431/rewritingof url-com-par%C3%a2metro-para-outro-site-htaccess

Browser other questions tagged

You are not signed in. Login or sign up in order to post.