homepage Welcome to WebmasterWorld Guest from 54.166.53.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
redirect using .htaccess to my private server
Salvatore



 
Msg#: 448 posted 10:35 pm on Mar 17, 2002 (gmt 0)

Hello webmasters,

i want to realize a new project, and dont know how.
The situation:
I have a domain eg www.domain.com with about 1 MB space on it. To connect the web im using a flatrate, so my server can be online all the time. On this server at home is apache installed for webserving, and a little utility, that automaticly uploads the .htaccess file with the new one with the new ip of my server at home, each time my internet-provider drops the line. htaccess is like this:
"Redirect /index.html [<ip>...]

This all works fine but now the problems:
The clients connecting to [domain.com...] are getting eg [81.177.202.63...]
How this can be solved so the client always sees [domain.com?...]

The second but much bigger problem are the search engines: What do they take up in theyr index? If its the page with my ip adress it would be a desaster cause its a dynamicly asigned ip.
If this is no problem would it affect my ranking?

How can i solve the problem so i can use my server at home?

Thanks

Salvatore

 

mark_roach

10+ Year Member



 
Msg#: 448 posted 11:47 pm on Mar 17, 2002 (gmt 0)

Welcome to WebmasterWorld Salvatore.

I think mod_rewrite will solve both of your problems.

Check out these links:

[httpd.apache.org...]
[engelschall.com...]

amoore

10+ Year Member



 
Msg#: 448 posted 11:50 pm on Mar 17, 2002 (gmt 0)

You could point your domain name to your dynamic IP address. There are a lot of services that do this kind of thing, and maybe one of them at [dmoz.org] would help you out.

Salvatore



 
Msg#: 448 posted 1:02 pm on Mar 18, 2002 (gmt 0)

Thanks for the replies.

I dont want to be dependant of one more service like eg dynip, so i decided to use modrewrite.
But i run into problems, cause i'm a 1day old beginner.
I tried this in htaccess:

rewriteEngine on
rewriteRule ^(.+) [80.131.138.48...] [L,R]

but received an internal server error when i call [mydomain.com....]
when i call [80.131.138.48...] my webserver is responding.

Salvatore



 
Msg#: 448 posted 1:39 pm on Mar 18, 2002 (gmt 0)

Just found the problem:

my webhoster doesnt allow mod_rewrite.

Is there another way to realize that?

gethan

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 448 posted 2:44 pm on Mar 18, 2002 (gmt 0)

1 as amoore: > You could point your domain name to your dynamic IP address

2 Assuming you are allowed to use perl and more particularly the LWP module you could set your error document to be a perl script that goes off and gets your pages.

HTH

DaveAtIFG

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 448 posted 9:57 pm on Mar 18, 2002 (gmt 0)

Hi Salvatore, we're pleased to have you join us at WebmasterWorld! :)

If your host permits, you may be able to use a Redirect instead of a Rewrite. Redirect commands rely on the mod_alias module, not mod_rewrite, so this may be available to you. Check with your host.

The Apache documents for mod_alias are here [httpd.apache.org] and I suspect you'll need the RedirectMatch directive. Additionaly, some discussion and examples are available here [freebsddiary.org]. These aren't the best examples for your situation but may get you going in a usable direction.

Salvatore



 
Msg#: 448 posted 10:26 pm on Mar 18, 2002 (gmt 0)

Thanks DaveAtIFG.

This works fine with this in htaccess:
RedirectMatch (.*)\.html$ [217.83.6.84$1.html...]
but: the user realizes a change in the adress from [mydomain.com...] to [217.83.6.84...] and the more important thing are search engines, what adress do they take up in their index?? and they realize the redirect i think.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved