Web Server Configuration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Server Configuration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 17th, 2005, 05:21 AM
verbatim verbatim is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 2 verbatim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 33 sec
Reputation Power: 0
htaccess rewriteEngine problem - which one of my variables is wrong?

i am trying to configure a rewrite rule that will redirect foo.bar.com to www.bar.com/okay/foo

i have attempted to alter the script below with no luck


Code:
############################ 
rewriteEngine On 
# Rewrite <subdomain>.example.com/<path> to example.com/<subdomain>/<path> 
# 
# Skip rewrite if no hostname or if subdomain is www 
RewriteCond %{HTTP_HOST} . 
RewriteCond %{HTTP_HOST} !^www\. [NC] 
# Extract (required) subdomain (%1), and first path element (%3), discard port number if present (%2) 
RewriteCond %{HTTP_HOST}<>%{REQUEST_URI} ^([^.]+)\.memblog\.com(:80)?<>/([^/]*) [NC] 
# Rewrite only when subdomain not equal to first path element (prevents mod_rewrite recursion) 
RewriteCond %1<>%3 !^(.*)<>\1$ [NC] 
# Rewrite to /subdomain/path 
RewriteRule ^(.*) /%1/$1 [L] 
 

can any one help me please

thanks

Reply With Quote
  #2  
Old July 9th, 2005, 12:55 AM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
to do a redirect simply, do this.

redirect /index.html http://blahblahblah/delay.html

that's all you have to do, try and see if it works for you.
__________________
Apache Expert

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Server Configuration > htaccess rewriteEngine problem - which one of my variables is wrong?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT