Hi guys.
I am using mod_rewrite to redirect to a website.
I want to be able to redraw mySite.com/ -> Geto home mySite.com/foo -> Geto redirected.
My redirect rule was
RewriteRule (^ \ w * $) redirect.php? Url = $ 1 [NC]
But IF has obviously forgotten something because when I go to tomyite.com / redirect.php
I need a regex which Lower and upper case allows underscores as well as characters, but it has to be ignored "empty" strings, so when I go to mySite.com/ the index file is displayed.
Any help?
Thank you!
rewrite %% REQUEST_FILENAME} -f rewrite rule ^ index.php index.php [L ] Rewrite angle% {REQUEST_FILENAME}! -f rewrite code% {REQUEST_FILENAME}! -d RectiteArrayal ^. * $ Redirect.php? Url = $ 1 [nc]
This may work, however, you do not need to use regex to get $ 1, which gives everything by default is.
Comments
Post a Comment