Twango Posted June 12, 2011 Share Posted June 12, 2011 Hey there, this code isn't working for me, help? RewriteBase /Options +FollowSymLinks -Indexes -MultiViewsRewriteEngine onRewriteRule %{HTTP_HOST} ^([^.]+)\.xxd.\in$ http://www.xxd.in [NC,L] It just redirects to an error page.Help! Link to comment Share on other sites More sharing options...
Ingolme Posted June 12, 2011 Share Posted June 12, 2011 I thought the RewriteRule directive only accepted two parameters. You've given it three. Link to comment Share on other sites More sharing options...
Twango Posted June 12, 2011 Author Share Posted June 12, 2011 I thought the RewriteRule directive only accepted two parameters. You've given it three.Then what would it look like fixed? Link to comment Share on other sites More sharing options...
Ingolme Posted June 12, 2011 Share Posted June 12, 2011 Well, I don't know exactly what you're trying to do. Link to comment Share on other sites More sharing options...
Twango Posted June 12, 2011 Author Share Posted June 12, 2011 All right, basically.When someone goes toNonExistantSubDomain.appattacknetwork.comit goes to http://www.appattacknetwork.com/informatio...istantSubDomain,But it works with all domains, (the subdomain is the ID)But I want it to not actually redirect Link to comment Share on other sites More sharing options...
Ingolme Posted June 12, 2011 Share Posted June 12, 2011 I think this one should work RewriteCond %{HTTP_HOST} ^[^.]*\.mysite\.comRewriteRule (.*) http://mysite.com/$1 [R=301,L] I'm not sure but I think the RewriteCond does accept regular expressions.Actually, I don't think mod-rewrite is going to solve your problems. If the request isn't actually getting to your server, the htaccess file isn't going to do anything for it. Link to comment Share on other sites More sharing options...
Synook Posted June 13, 2011 Share Posted June 13, 2011 As long as the nameserver is set up to point <any-subdomain>.appattacknetwork.com to appattacknetwork.com, then it will work*.* at least, the server will see the request. Link to comment Share on other sites More sharing options...
Twango Posted June 13, 2011 Author Share Posted June 13, 2011 All right I don't know how to do this;I want code, that redirects ANY request for *.xxd.in to www.xxd.in/*. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.