mcsolas
asked on
htaccess - forcing a shorter url
I just want to know how to config the htaccess to do this one function:
say someone comes in typing www.domain.dom
I want to have them arrive at domain.com
Same true for all links. Anything that comes in with www. it trims it out. I just want to keep my url short for when google indexes me the first time.
say someone comes in typing www.domain.dom
I want to have them arrive at domain.com
Same true for all links. Anything that comes in with www. it trims it out. I just want to keep my url short for when google indexes me the first time.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
works perfect its already functioning for me :)
http://www.pacificallsurf.com/
redirects perfectly.
I had 2 of those lines in the joomla code already. I simply put them in the same order and it seems to be working within the other commands joomla is doing on the url.
http://www.pacificallsurf.com/
redirects perfectly.
I had 2 of those lines in the joomla code already. I simply put them in the same order and it seems to be working within the other commands joomla is doing on the url.
ASKER
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
RewriteCond %{HTTP_HOST} !^fully\.qualified\.domain
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R]
I think this is just about what I need. Still could use a little advice.