Jump to content

.htaccess subdomain redirect to non-www not working


Ivan Gretsky
 Share

Recommended Posts

Good day!

This topic got split off this post in Jumplinks topic. It seems the problem is not related to the module.

I  got a site that responds differently to different subdomains. I am writing a .htaccess redirect from www of a subdomain to no-www.

RewriteCond %{HTTP_HOST} ^www\.subdomain.domain\.ru$ [NC]
RewriteRule ^(.*)$ http://subdomain.domain.ru/$1 [R=301,L]

If I run www.subdomain.domain.ru it gets redirected to subdomain.domain.ru. But if I go to something like www.subdomain.domain.ru/something I get redirected to subdomain.domain.ru/index.php?it=something/ not to subdomain.domain.ru/something.

I tried putting my code before and after PROCESSWIRE HTACCESS DIRECTIVES block without a difference. Could you please give me a hint here?

Edited by Ivan Gretsky
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...