Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old September 30th, 2004, 04:19 PM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 507 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 13 m 2 sec
Reputation Power: 2
Send a message via AIM to bluephoenix
mod_rewrite

My old url was www.example.com/daily, the new url is www.example.com/abc/daily. I want to use mod_rewrite to keep www.example.com/daily as the url.

Here's what I have thus far, but doesn't work.

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/daily$ /abc/daily [R,L]
</IfModule>

Anyone? Thanks.

-Tim

Reply With Quote
  #2  
Old October 4th, 2004, 04:12 PM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 507 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 13 m 2 sec
Reputation Power: 2
Send a message via AIM to bluephoenix
RE: mod_rewrite

I wish Postal Cow was here... he'd know what to do. <sigh>

-Tim

Reply With Quote
  #3  
Old October 4th, 2004, 04:30 PM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 4
RE: mod_rewrite

See if this will return anything, my mod_rewrite is a little rusty.

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteCond %{REQUEST_URI} ^/daily$ [NC]
RewriteRule ^(.*)$ /abc/daily/$1 [R,L]

Reply With Quote
  #4  
Old October 12th, 2004, 11:11 PM
rehfeld_dot_us rehfeld_dot_us is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 825 rehfeld_dot_us User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: mod_rewrite

RewriteEngine on

RewriteRule ^abc/daily$ abc/daily/ [R,L]
RewriteRule ^abc/daily/$ daily/ [L]


you might need to change all the
abc to /abc


those who request website.com/daily/ will not be rewritten
those who request website.com/abc/daily will be redirected to website.com/abc/daily/
those who request website.com/abc/daily/ will be rewritten to website.com/daily/

lemme know if thats what you wanted

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > mod_rewrite


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