GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Need help redirecting x.com to www.x.com....... (https://gfy.com/showthread.php?t=749021)

madawgz 07-05-2007 07:00 PM

Need help redirecting x.com to www.x.com.......
 
on a bsd box, does it have to be changed in the httpd.conf?

any ideas how i can do this?

BJ 07-05-2007 07:01 PM

your host should do this for you

BoyAlley 07-05-2007 07:04 PM

You can edit httpd.conf or you could just put this in .htaccess file in your public_html for the domain.

Code:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.x.com$ [NC]
RewriteRule ^(.*)$ http://www.x.com/$1 [L,R=301]


JD 07-05-2007 07:05 PM

yup BoyAlley is right. that'll git'er dun

fris 07-05-2007 07:15 PM

modrewrite is so 90s

tical 07-05-2007 07:16 PM

in your httpd.conf find the virtualhost entry and add (under ServerName)

ServerAlias www.x.com

CIVMatt 07-05-2007 07:22 PM

BoyAlley is right

clearcut 07-05-2007 07:33 PM

catch all
 
"Catch all subdomains" in apache can help depending on your setup


<VirtualHost xx.xxx.xxx.xx:80>
ServerAlias *.mydomain.com
RedirectPermanent / (URL address blocked: See forum rules)
</VirtualHost>

Jace 07-05-2007 07:57 PM

can I buy x.com from you for $2?

Goodings Media 07-05-2007 08:01 PM

Quote:

Originally Posted by Fris (Post 12710397)
modrewrite is so 90s

whats wrong with it?

starpimps 07-05-2007 08:06 PM

you are damn leet now x.com...

thehose 07-05-2007 08:08 PM

Quote:

Originally Posted by Fris (Post 12710397)
modrewrite is so 90s

well mr. knowitall... you still hafta use it in little things like... say, Wordpress blogs. Oh the wonders of SEO!

fluffygrrl 07-05-2007 08:36 PM

Quote:

Originally Posted by Fris (Post 12710397)
modrewrite is so 90s

Being around for 20 years means something's good in the linux world.

Superterrorizer 07-05-2007 08:50 PM

Quote:

Originally Posted by fluffygrrl (Post 12710709)
Being around for 20 years means something's good in the linux world.

What's been around for 20 years? Apache and Linux are both in their teens.

And to answer the guys question, use ServerAlias, not mod_rewrite. Doing it the mod_rewrite way is a waste of cpu cycles. You'll also be better off using www.x.com as the servername and x.com as the alias.

madawgz 07-05-2007 09:01 PM

Quote:

Originally Posted by BoyAlley (Post 12710361)
You can edit httpd.conf or you could just put this in .htaccess file in your public_html for the domain.

Code:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.x.com$ [NC]
RewriteRule ^(.*)$ http://www.x.com/$1 [L,R=301]


thanks, that worked

try it out http://eatmyshorts.net/ :thumbsup

BoyAlley 07-05-2007 09:16 PM

Quote:

Originally Posted by madawgz (Post 12710785)
thanks, that worked

try it out http://eatmyshorts.net/ :thumbsup

Hawt........

HighEnergy 07-05-2007 09:30 PM

Why not an "A" record?

HighEnergy 07-05-2007 09:35 PM

I meant a "C"

KrisKross 07-05-2007 09:41 PM

No, you meant an A record. ;)

You could use a CNAME record, but an A record would be better. It wouldn't quite be a redirect, though.

HighEnergy 07-05-2007 09:47 PM

I should have reread the post :) I also took it to be the same domain?

Vick! 07-05-2007 09:48 PM

Quote:

Originally Posted by HighEnergy (Post 12710878)
Why not an "A" record?

Quote:

Originally Posted by HighEnergy (Post 12710903)
I meant a "C"

Mostly we do non-www to www. because we also wait to pass any possible link weight to www. as well. And for that we need 301 redirect, not just a redirect. And the code BoyAlley gave do the job well.


All times are GMT -7. The time now is 06:19 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123