Jump to content

mod_rewrite not working properly?


Twango

Recommended Posts

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...