Another question.

I've been looking around for a solution to a need I have with my .htaccess 
configuration.

I would like it to be intelligent and have the same .htaccess file work on my 
test server and on my hosting account.

A little background -  I have a Fedora box on a private IP that I use as a LAMP 
dev box.  In my windows host file I have a number of lines that are like this : 

192.168.1.20 somedomain.dev .  

The IP of the dev box is 192.168.1.20.  In the httpd.conf file I have a vhost 
setup for somedomain.dev.  So when I enter somedomain.dev into the address box 
of my browser I see my dev server's output for that test site.  

So what I want to do it take an .htaccess that is similar to this:

ErrorDocument 404 http://www.somedomain.com/

Options +FollowSymlinks
RewriteEngine On
rewriteCond %{http_host} ^somedomain.com
rewriteRule ^(.*) http://www.somedomain.com/$1 [R=301,L]

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^(.*)$ http://www.somedomain.com/ [R=301,L]

--

So in a nut shell I would like to have the .htaccess work on both servers so 
that on my local dev box it would know that somedomain.com would actually be 
somedomain.dev and in the production environment it would know that the TLD is 
dot com, not dot dev

Thanks in advance!





------------------------

Keith Smith


      
---------------------------------------------------
PLUG-discuss mailing list - [email protected]
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

Reply via email to