Fedora Linux Support Community & Resources Center
  #1  
Old 30th August 2008, 02:49 PM
marcelkraan's Avatar
marcelkraan Offline
Registered User
 
Join Date: Jul 2006
Location: Netherlands/Velsen (5km from amsterdam)
Posts: 230
Mod Rewrite Apache problem

Hello i'am trying to redirect a script.
but no luck.
2 servers www.bigairbag.nl www.bigairbag.net (loadbalanced with round robin www.bigairbag.com)
including mysql replication from www.bigairbag.net to www.bigairbag.nl

NEED HELP ON THIS:
http://www.bigairbag.nl/?p=7 MUST GOTO http://www.bigairbag.net/?p=7
iam searching google and trying and trying... help :-)


RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.bigairbag.nl$ [NC]
#RewriteCond %{REQUEST_URI} ^\?p=7$
RewriteRule ^(.*)$ http://www.bigairbag.net/$1 [R,L]

Last edited by marcelkraan; 31st August 2008 at 07:07 AM.
Reply With Quote
  #2  
Old 30th August 2008, 03:23 PM
briantan Offline
Registered User
 
Join Date: Jun 2008
Posts: 715
try this:

RewriteRule ^/(.*)$ http://www.bigairbag.net/$1 [R]

Edit: you may need this too within VirtualHost directive

RewriteOptions Inherit

Last edited by briantan; 30th August 2008 at 03:25 PM.
Reply With Quote
  #3  
Old 30th August 2008, 03:26 PM
marcelkraan's Avatar
marcelkraan Offline
Registered User
 
Join Date: Jul 2006
Location: Netherlands/Velsen (5km from amsterdam)
Posts: 230
No sorry still the same... it could be sooo easy but it's a hard job :-)
Reply With Quote
  #4  
Old 30th August 2008, 03:27 PM
briantan Offline
Registered User
 
Join Date: Jun 2008
Posts: 715
Code:
ServerName www.bigairbag.nl
....
RewriteEngine On
RewriteOptions Inherit
RewriteRule ^/(.*)$ http://www.bigairbag.net/$1 [R]

Last edited by briantan; 30th August 2008 at 03:43 PM.
Reply With Quote
  #5  
Old 31st August 2008, 07:06 AM
marcelkraan's Avatar
marcelkraan Offline
Registered User
 
Join Date: Jul 2006
Location: Netherlands/Velsen (5km from amsterdam)
Posts: 230
With this the entire site is redirected anbd that is already oke.

RewriteEngine On
RewriteOptions Inherit
RewriteRule ^(.*)$ http://www.bigairbag.net/$1 [R]

then i need only page 7 to redirect?

RewriteEngine On
RewriteOptions Inherit
RewriteCond %{REQUEST_URI} ^p=7$
RewriteCond %{HTTP_HOST} ^www.bigairbag.nl$ [NC]
RewriteRule ^(.*)$ http://www.bigairbag.net/$1 [R]

but this is also not working?
Reply With Quote
  #6  
Old 31st August 2008, 01:22 PM
briantan Offline
Registered User
 
Join Date: Jun 2008
Posts: 715
Quote:
Originally Posted by marcelkraan
With this the entire site is redirected anbd that is already oke.

RewriteEngine On
RewriteOptions Inherit
RewriteRule ^(.*)$ http://www.bigairbag.net/$1 [R]

then i need only page 7 to redirect?

RewriteEngine On
RewriteOptions Inherit
RewriteCond %{REQUEST_URI} ^p=7$
RewriteCond %{HTTP_HOST} ^www.bigairbag.nl$ [NC]
RewriteRule ^(.*)$ http://www.bigairbag.net/$1 [R]

but this is also not working?
p=7 is a QUERY_STRING not REQUEST_URI. So it should be

Code:
RewriteEngine On
RewriteOptions Inherit
RewriteCond %{HTTP_HOST} ^www.bigairbag.nl$ [NC]
RewriteCond %{QUERY_STRING} ^p=7$
RewriteRule ^/(.*)$ http://www.bigairbag.net/$1 [R]
Reply With Quote
  #7  
Old 31st August 2008, 03:08 PM
marcelkraan's Avatar
marcelkraan Offline
Registered User
 
Join Date: Jul 2006
Location: Netherlands/Velsen (5km from amsterdam)
Posts: 230
thank you very much this is working...
perfect!!
Reply With Quote
  #8  
Old 31st August 2008, 06:09 PM
briantan Offline
Registered User
 
Join Date: Jun 2008
Posts: 715
You're welcome.
Reply With Quote
Reply

Tags
apache, mod, problem, rewrite

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache reverse proxy rewrite rules collen Servers & Networking 3 21st November 2007 07:59 AM
Anyone experience about Rewrite rule (mod rewrite ) in apache ? sir pratchaya Servers & Networking 2 20th September 2005 04:00 AM
Mod rewrite problem Bunyack Using Fedora 0 10th May 2005 08:08 PM


Current GMT-time: 20:42 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat