Mod_Rewrite help for a noob please

I want to rewrite all URLs of the form:

http://www.site.com/push20/dir1/dir2/afile.html

to

http://www.site.com/dir1/dir2/afile.html

I.e. lose the 'push20' bit

Ive tried with:

   RewriteEngine On
   RewriteRule   ^push20/(.*) /$1 [R]

Open in new window


but its not happening....

Suggestion please!
arndale65Asked:
Who is Participating?
 
ravenplCommented:
If in httpd.conf then (note the leading slash change)

   RewriteEngine On
   RewriteRule   ^/push20/(.*) /$1 [L,R]
0
 
ravenplCommented:
Looks good if put in .htaccess
Have You put that in .htaccess or apache config file?
0
 
arndale65Author Commented:
httpd.conf
0
 
arndale65Author Commented:
That's it! - thanks a million
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.