|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
||||
|
||||
|
RE: mod_rewrite
I wish Postal Cow was here... he'd know what to do. <sigh>
-Tim |
|
#3
|
|||
|
|||
|
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]
|
|
#4
|
|||
|
|||
|
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 |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > mod_rewrite |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|