Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-01-2009, 11:36 AM   PM User | #1
Saz
Regular Coder

 
Join Date: Jun 2005
Posts: 277
Thanks: 5
Thanked 0 Times in 0 Posts
Saz is an unknown quantity at this point
301 from one address without .com to one with .com ?

Been trying to find an answer on the net somewhere, but have not been able to.

ok, if you wanted all hits on :

http://www.websitename/pagename

to go to

http://www.websitename.com/pagename/

and you didn't want to upset any search engines and not lose any pr, how would you do it please ?

Any help appreciated.

Saz.
Saz is offline   Reply With Quote
Old 10-01-2009, 02:07 PM   PM User | #2
charlesandrews
New to the CF scene

 
Join Date: Sep 2009
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
charlesandrews is an unknown quantity at this point
How would http://www.websitename/pagename work without a TLD? I posted in another thread:

Quote:
I haven't actually tested this, but from this mod_rewrite guide I think you would want to use:

Code:
RewriteRule http://www.yourdomain.com/?redir=(.*) $1 [R=301,L]
Let me know if this works for you, if not we can try something different.
Which you could adapt sort of like:

Code:
RewriteRule http://www.websitename/(.*) http://www.websitename.com/$1
charlesandrews is offline   Reply With Quote
Old 10-01-2009, 04:20 PM   PM User | #3
Saz
Regular Coder

 
Join Date: Jun 2005
Posts: 277
Thanks: 5
Thanked 0 Times in 0 Posts
Saz is an unknown quantity at this point
Many thanks Charles, that's worked a dream - cheers.

One last thing, to redirect a user from a particular IP address to another page on the same website, I'm trying :
RewriteEngine on
RewriteCond %{REMOTE_ADDR} ^92\.53\.62\.24$ [OR]
RewriteCond %{REMOTE_ADDR} ^24\.151\.467\.151$
RewriteRule ^(.*)$ http://www.websitename.com/folder/index.php [L]

But, it's not working ? ?

Any help appreciated.

Saz
Saz is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:32 AM.


Advertisement
Log in to turn off these ads.