Make shortened and long urls play together on the same domain (RewriteRule).
Posted
by
Renato Renato
on Server Fault
See other posts from Server Fault
or by Renato Renato
Published on 2010-12-27T16:06:24Z
Indexed on
2010/12/27
16:56 UTC
Read the original article
Hit count: 302
Long story short, I want to have both example.com/aJ5
and example.com/any-other-url
working together.
I'm using apache and not very good at writing regex.
I have already a global RewriteRule
which sends everything to the app entry point.
What I need is to tell apache if length($path) is <= 5 chars
then rewrite to another location.
I know I can use {1,5}
like syntax in regex, but don't really know if it's what I'm looking for.
I'd like to implement this at web-server level rather than php level. Any help is appreciated.
© Server Fault or respective owner