Wednesday, April 25, 2012

Change Folder Name Using mod_rewrite

For anybody out there that may be needing to do a simple directory name replacement using mod_rewrite:
RewriteEngine On
RewriteRule ^(.+)\/abc\/(.+)$ $1\/xyz\/$2
So http://blah.com/abc/image.jpg becomes http://blah.com/xyz/image.jpg

0 comments:

Post a Comment

 
Blogger Templates