| 
		
			
			
				
			
			
				 
			
			
				
			
		 | 
		
			
			
				 
			
				
			
		 | 
	||||
| 
				Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.  You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us.  | 
		
		 
		![]()  | 
	
		
			
  | 	
	
	
		
		|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. | 
| 
		 | 
	Thread Tools | 
| 
			
			 | 
		#1 | 
| 
			
			
			
			 Guest 
			
		
			
			
			
					Posts: n/a
				 
				
				
				
				 | 
	
	
	
	
		
			
			 Ok, I am doing a simple domain.com to www.domain.com redirect, and it works fine, but if you go to domain.com/somepage.html it redirects to www.domain.com/ instead of www.domain.com/somepage.html. 
		
	
		
		
		
		
		
		
			
		
		
	
	Anyone know why? And how to fix it? Code: 
	<IfModule mod_rewrite.c>
  RewriteEngine On
  Options +FollowSymLinks
  Options +Indexes
  ErrorDocument 404 /
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . / [L]
  RewriteCond %{HTTP_HOST} ^([^.]+\.(com|net|org)) [NC]
  RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
</IfModule>
 | 
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 aliasx 
			
		
			
				
			
			
			Join Date: Apr 2001 
				
				
				
					Posts: 19,010
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Try a full document url for the 404 / 
		
	
		
		
		
		
			eg: ErrorDocument 404 /404.html or you could use a full url ErrorDocument 404 http://www.someserver.com/404.html 
				__________________ 
		
		
		
		
	
	https://porncorporation.com  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 hi 
			
		
			
			
			Industry Role:  
				Join Date: Jun 2002 
				
				
				
					Posts: 16,731
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 This is my non-www to www redirection code. Might be of use. 
		
	
		
		
		
		
			Code: 
	#WWW Redirect
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
				__________________ 
		
		
		
		
	
	M3Server - NATS Hosting  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#4 | |
| 
			
			
			
			 Guest 
			
		
			
			
			
					Posts: n/a
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 Mine is the same as yours, except I use regex in mine so I don't have to edit it and can just upload the same .htaccess file to any new site I create without editing anything, which is what I want, since my framework doesn't need anything different. Works for any domain with .com/net/org.  | 
|
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Guest 
			
		
			
			
			
					Posts: n/a
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Edit: Scratch that...  
		
	
		
		
		
		
		
		
			
		
		
	
	 | 
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#6 | 
| 
			
			
			
			 aliasx 
			
		
			
				
			
			
			Join Date: Apr 2001 
				
				
				
					Posts: 19,010
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 You added ! then $ and it worked? cool!$ 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	https://porncorporation.com  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Guest 
			
		
			
			
			
					Posts: n/a
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Gah, still not fucking working. 
		
	
		
		
		
		
		
	
	 | 
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 aliasx 
			
		
			
				
			
			
			Join Date: Apr 2001 
				
				
				
					Posts: 19,010
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Bump, I tried to help. No luck, Kill says he has mod rewrite active.  This didn't work: 
		
	
		
		
		
		
			RewriteCond %{HTTP_HOST} !^www.dom.com$ [NC] RewriteRule ^(.*)$ http://www.dom.com/$1 [R,L] 
				__________________ 
		
		
		
		
	
	https://porncorporation.com  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 Guest 
			
		
			
			
			
					Posts: n/a
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 It's redirecting the domain properly, but during the redirection, it's killing any actual directory and or pages you have after it. 
		
	
		
		
		
		
		
	
	 | 
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#10 | 
| 
			
			
			
			 Viva la vulva! 
			
		
			
				
			
			
			Join Date: Mar 2003 
				Location: you can't please everyone, so you got to please yourself 
				
				
					Posts: 16,557
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 This is what I use: 
		
	
		
		
		
		
			
		
		
		
		
	
	Code: 
	RewriteEngine On 
RewriteCond %{HTTP_HOST} !^www\.mikeyddddd\.com$ [NC]
Rewriterule (.*) http://www.mikeyddddd.com/$1 [R=301]
 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 Totally Borked 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Feb 2005 
				
				
				
					Posts: 6,284
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 and to add my  
		
	
		
		
		
		
			 , this is what I use:Code: 
	RewriteEngine on
rewritecond %{http_host} ^domain\.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc,L]
hence the ^domain.com the others use !^www.domain.com which would rewrite subdomain.domain.com which I can't have 
				__________________ 
		
		
		
		
		
			
		
		
	
	![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#12 | 
| 
			
			
			
			 So Fucking Banned 
			
		
			
			
			Join Date: Oct 2008 
				Location: philly 
				
				
					Posts: 5,099
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 and I will just post so I can find this thread later  
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#13 | 
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Aug 2002 
				
				
				
					Posts: 55,372
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 try this 
		
	
		
		
		
		
			Code: 
	RewriteCond %{HTTP_HOST} ^([^.]+\.(com|net|org)) [NC]
RewriteRule .* http://%1%{REQUEST_URI} [R=301,L]
				__________________ 
		
		
		
		
	
	Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#14 | 
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Aug 2002 
				
				
				
					Posts: 55,372
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 should be this actually 
		
	
		
		
		
		
			Code: 
	RewriteCond %{HTTP_HOST} ^([^.]+\.(com|net|org)) [NC]
RewriteRule .* http://www.%1%{REQUEST_URI} [R=301,L]
				__________________ 
		
		
		
		
	
	Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#15 | 
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Aug 2002 
				
				
				
					Posts: 55,372
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 also try this one 
		
	
		
		
		
		
			Code: 
	RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
				__________________ 
		
		
		
		
	
	Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#16 | 
| 
			
			
			
			 hi 
			
		
			
			
			Industry Role:  
				Join Date: Jun 2002 
				
				
				
					Posts: 16,731
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 fris to the rescue 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	M3Server - NATS Hosting  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#17 | 
| 
			
			
			
			 Guest 
			
		
			
			
			
					Posts: n/a
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Neither work still, no fucking clue wtf is going on, I'll have to talk to tech at AmeriNOC maybe something with the server I'm on. 
		
	
		
		
		
		
		
	
	 | 
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#18 | 
| 
			
			
			
			 Confirmed User 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Nov 2005 
				Location: RI 
				
				
					Posts: 2,112
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 all of yous are wrong, this is what he wants 
		
	
		
		
		
		
			Code: 
	rewritecond %{HTTP_HOST} ^yoursite\.com 
RewriteRule ^(.*) http://www.yoursite.com/$1 [L,R=301]
				__________________ 
		
		
		
		
	
	![]() SUBMIT PORN BLOGS HERE  SUBMIT PORN STAR GALLERIES Partner accounts for sale ICQ 467879053 Trade Traffic Trade Hardlinks Dot Com Auction Myspace BlogNow Hiring My network is in need of clean, honest, good traders for different niches. Contact  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#20 | 
| 
			
			
			
			 Guest 
			
		
			
			
			
					Posts: n/a
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Thanks for everyones help, but I finally after giving it another whirl today, got it. 
		
	
		
		
		
		
		
	
	Problem? I put the code just below RewriteBase / Code: 
	<IfModule mod_rewrite.c>
  RewriteEngine On
  Options +FollowSymLinks
  Options +Indexes
  ErrorDocument 404 /
  RewriteBase /
  RewriteCond %{HTTP_HOST} ^([^.]+\.(com|net|org))$ [NC]
  RewriteRule ^(.*)$ http://www.%1/$1 [L,R=301]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . / [L]
</IfModule>
 | 
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#21 | 
| 
			
			
			
			 Confirmed User 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Aug 2008 
				Location: Hollywood 
				
				
					Posts: 2,785
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Hows your Tube script turning out btw? 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 |