|
Answer» Hey All,
I just set up a new domain to run a third SITE on my server. I can only run it with a correct mod_rewrite of my .htaccess file. Problem is, I cannot figure out what is causing the redirect.
Here is the code I have. I want to add peaceinlosangeles.org, but I can't. I tried to duplicate what was done for cadharmacelebration.org, but with no success. Thanks.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.meditateinla.org$ RewriteRule ^(.*)$ http://www.meditateinla.org/$1 [R=301,L]
RewriteBase /
# Remove index.php # Uses the "include method" # http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} ^/(mobile|home|sitemap|books|misc|center|courses|information|buddhism|locations|service|temple|classes|_includes|feeds|search|styles|news|ical|slideshows|retreats|_templates|errors|_components||members|P[0-9]{2,8}) [NC] RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteRule ^sitemap.xml?$ /sitemap/xml/
# Remove IE image toolbar
Header set imagetoolbar "no"
# -- LG .htaccess Generator End --
RewriteCond %{HTTP_HOST} ^meditateinla.com$ [OR]
RewriteCond %{HTTP_HOST} ^cadharmacelebration.org$ [OR] RewriteCond %{HTTP_HOST} ^www.cadharmacelebration.org$ RewriteRule ^/?$ "http\:\/\/cadharmacelebration\.org" [R=301,L]I have no idea what you are doing. My cheap space on a a virtual server lets me put as many domains as I want. I never write a bit of code. The name server directs the domains to folders on my site. So why do you have to do this code?My hosting solution has a strange arrangement The first domain is in the root directory. The second domain is in a sub-directory. WITHOUT the mod_rewrite the site won't function. For instance my third site is claimed by my original domain. Ie my domain.com/new site.com I can't get the mod_rewrite code correct to stop the main site from claiming the new site. That's why I need the code. Unless the site is free, you should find another web host. A LOT of cheap hosting is on a Linux server using cpanel. Here is a bit about cpanel. It works.
http://en.wikipedia.org/wiki/CPanel
If you PAY a little extra, the Web Host can sell you a WHM (Web Host Manager) where is domain has its own public_html directory.Not a bad idea. I was hoping to work out something here. Wonder if there's a way to create a subdirectory for the main site and work out the htaccess that way. This is exactly the way my host is set up too - the main site IS the public_html FOLDER and other sites are in, for e.g. abc.com subfolders. This is done through cPanel though, so I don't have a clue what htaccess rules are applied to them.One detail. When you set up a domain - you also have to set the timeservers for the domain. The timeservers have to be published and propagated over the WWW before they will resolve.
|