DannyG
November 1st, 2006, 09:31 PM
Hello,
I am trying to setup my webserver to do a simple bit of redirection. Adding the following code to apache2.conf Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*/webmail) https://www.mydomain.com/webmail [R] successfuly results in http://www.mydomain.com/webmail/ being redirected to https://www.mydomain.com/webmail/.
However, I am trying to set up a redirection so that anyone going to http://www.mydomain.com/ will be redirected to http://mydomain.com/blog/ but I cannot seem to get it to work. I have added these lines of code to apache2.conf RewriteRule (.*/) http://www.mydomain.com/blog/ [R=permanent,L] however when I try and access http://www.mydomain.com Firefox gives me the message:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
*This problem can sometimes be caused by disabling or refusing to accept cookies.
Now I know for a fact there is nothing wrong with my cookies. Can anyone tell me what the problem is? And is there anything I can do to optimize my current code for SEO, because I'm fairly sure there is.
I'm quite new to Apache and mod_rewrite, so go easy on me.
Thanks,
Daniel.
I am trying to setup my webserver to do a simple bit of redirection. Adding the following code to apache2.conf Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*/webmail) https://www.mydomain.com/webmail [R] successfuly results in http://www.mydomain.com/webmail/ being redirected to https://www.mydomain.com/webmail/.
However, I am trying to set up a redirection so that anyone going to http://www.mydomain.com/ will be redirected to http://mydomain.com/blog/ but I cannot seem to get it to work. I have added these lines of code to apache2.conf RewriteRule (.*/) http://www.mydomain.com/blog/ [R=permanent,L] however when I try and access http://www.mydomain.com Firefox gives me the message:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
*This problem can sometimes be caused by disabling or refusing to accept cookies.
Now I know for a fact there is nothing wrong with my cookies. Can anyone tell me what the problem is? And is there anything I can do to optimize my current code for SEO, because I'm fairly sure there is.
I'm quite new to Apache and mod_rewrite, so go easy on me.
Thanks,
Daniel.