Forum Moderators: phranque
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule (.*) http://www.example.com$1 [R=301] This must be placed either in your Apache configuration file, or a text file called .htaccess in the root directory of your site.
When typing [mysite.net...] it did indeed redirect to www. But when typing [mysite.net...] it stated: The page cannot be displayed.
What now? I put the htaccess file in the public_html dir.
Any ideas?
reman
As for it not working: is mamboserver a file or a directory? If it's a directory, does it work when you type in [mysite.net...] (with a slash at the end)?
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.* [NC]
RewriteRule (.*) [mysite.*...] $1 [R=301]
ie anything with mysite needs to be changed to www.mysite?
I saw this but it did not work
RewriteEngine on
RewriteRule ^/$ /e/www/ [R]
Thanks!
reman
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} ^herspace2\.net
RewriteRule ^(.*)$ [herspace2.net...] [R=permanent]
Works!
Thanks!
Have a nice one!
reman
[edited by: jatar_k at 5:33 pm (utc) on July 9, 2004]
[edit reason] removed url [/edit]