htaccess

htaccess

by santhosh kumar -
Number of replies: 0

Hi All,


I am wondering weather it's possible to use .htaccess to rewrite a folder name. What I mean is this.

Lets say I have a url like:

http://mysite.com/hello1/changeme/hello2/all_classes.php.

Now I want to rewrite the url to (for example)

http://mysite.com/hello1/changed/hello2/all_classes.php.

The "changeme" is an existing folder on my webspace.

important: the "changed" is not a folder rather just a name!

Ok here is a step by step plan:

  1. User types
    http://mysite.com/hello1/changeme/hello2/all_classes.php.
  2. The url should rewrite and not redirect the url to
    http://mysite.com/hello1/changed/hello2/all_classes.php

Average of ratings: -