Mobile app version of vmapp.org
Login or Join
Odierno851

: Apache URL redirection not working with mod_rewrite I want to redirect the URL: http://example.com/site to http://example.com/~username/site I have the following in my httpd.conf file: RewriteEngine

@Odierno851

Posted in: #ModRewrite #UrlRewriting

I want to redirect the URL:
example.com/site to example.com/~username/site

I have the following in my httpd.conf file:

RewriteEngine on
RewriteRule ^/site/(.*) /~username/site/ [PT]


but this does not seem to be working. It tries to look for /site under /var/www/site/ and fails. What am I doing wrong? FYI, I have also tried with:

RewriteRule ^/site/(.*)$ /~username/site/ [PT]

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Odierno851

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme