rpflo
02-16-2009, 07:26 PM
Just trying to avoid downtime while I move all my sites over to bluehost but my htaccess isn't working.
This is what I have currently that works on a different server:
RewriteEngine On
RewriteRule ^([^/\.]+)/?$ page.php?id=$1
Didn't work for my temporary web address at http://66.147.242.152/~ryanflor/
I got a sample file from support that looks like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ http://www.domain.com/folder/$1 [R=301,L]
I switched the file from support to this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^66.147.242.152$
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/(.*)$ http://66.147.242.152/~ryanflor/page.php?id=$1 [R=301,L]
I'm simply trying to get something like this:
http://66.147.242.152/~ryanflor/lamesauce
to redirect to
http://66.147.242.152/~ryanflor/page.php?id=lamesauce
I have a hunch I won't have any problems when I actually switch the name servers and plop my domain in the file and get rid of the whole ipaddress/~ryanflor thing, but I don't want any downtime and want to make sure my htaccess files are working.
Does it work differently for the temporary domains?
Any tips and help would be much appreciated. Thanks a ton.
This is what I have currently that works on a different server:
RewriteEngine On
RewriteRule ^([^/\.]+)/?$ page.php?id=$1
Didn't work for my temporary web address at http://66.147.242.152/~ryanflor/
I got a sample file from support that looks like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ http://www.domain.com/folder/$1 [R=301,L]
I switched the file from support to this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^66.147.242.152$
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/(.*)$ http://66.147.242.152/~ryanflor/page.php?id=$1 [R=301,L]
I'm simply trying to get something like this:
http://66.147.242.152/~ryanflor/lamesauce
to redirect to
http://66.147.242.152/~ryanflor/page.php?id=lamesauce
I have a hunch I won't have any problems when I actually switch the name servers and plop my domain in the file and get rid of the whole ipaddress/~ryanflor thing, but I don't want any downtime and want to make sure my htaccess files are working.
Does it work differently for the temporary domains?
Any tips and help would be much appreciated. Thanks a ton.