You just put the rewrite rules in a new .htaccess in the subdomain folder rather than the root (or public_html) folder.
I'm new to mod_rewrite and am in need of some help......
I figured most of it out, but I don't have a clue on how to rewrite a url for a subdomain.
basically, this is what I got so far and it works fine:
my sub domains are:Code:RewriteEngine on RewriteRule ^home$ index.html [L] RewriteRule ^gallery$ gallery.html [L] RewriteRule ^upload$ upload.html [L] RewriteRule ^links$ links.html [L] RewriteRule ^support$ support.html [L]
blog.ugly-cars.com
gallery.ugly-cars.com
the gallery.html is already changed to /gallery, but gallery.ugly-cars.com is an iframe within the gallery.html page so it needs to have a rewrite done. the blog sub domain is just a simple word press blog that is its own page.
any help is appreciated.
You just put the rewrite rules in a new .htaccess in the subdomain folder rather than the root (or public_html) folder.
I figured out why my sub domains weren't working-I forgot I had directed my sub domains to a directory that I recently moved my files out of.
now....
when you visit this page:
http://www.ugly-cars.com/gallery
it should take you to this page:
http://www.ugly-cars.com/gallery.html
but it doesn't....it takes you to gallery.ugly-cars.com...any reason why?










http://www.ugly-cars.com/gallery stays the same for me.
that redirects to the actual photo gallery and not the gallery.html page that has the gallery embedded into the page with an iframe.
this is what the page should look like:
http://www.ugly-cars.com/gallery.html
I'm not sure why RewriteRule ^gallery$ gallery.html [L]
would make the page go to entire gallery and not the gallery.html page.
the rewrite rule works fine on all the other .html files as its supposed to.
Do you have a folder called /gallery/ ?
Bookmarks