Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

htaccess rewrite also rewrites subdomains

  • Please log in to reply




  • Member
  • PipPip
  • 17 posts
not sure if i'm posting in the right forum, sorry if i'm not

anyways, i have a problem with rewriting with .htaccess files.

I'm rewriting url's in my root directory:

RewriteEngine OnRewriteBase /RedirectMatch ^/$ /homepagina/RewriteRule ^overons/ index.php?page=overonsRewriteRule ^werkwijze/ index.php?page=werkwijzeRewriteRule ^portfolio/ index.php?page=portfolioRewriteRule ^contact/ index.php?page=contactRewriteRule ^homepagina/ index.php?page=homepaginaRewriteRule ^oplossingen/(.*)/$ index.php?page=oplossingen&sort=$1RewriteRule ^oplossingen/ index.php?page=oplossingenRewriteRule ^whois/ index.php?page=whois

now everything works fine, but the problem is that subdomains also redirect. So if i go to http://sub.mydomain.com/, it also redirects to sub.mydomain.com/homepagina/.

Someone said that uploading an empty htaccess file to the subdomain folder would do the trick; it didn't
Some other guy said an htaccess file containing only "RewriteEngine Off" would do the trick; it didn't

i.e. the redirect only has to work when the user is at www.mydomain.com, not whatever.mydomain.com

its not the end of the world, but it's pretty annoying... anyone know what to do? thanks in advance!

Edited by tychobarnard, 01 August 2009 - 05:13 AM.

  • 0


Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP