Many URI include components consisting of or delimited by, certain
special characters. These characters are called “reserved”, since
their usage within the URI component is limited to their reserved
purpose. If the data for a URI component would conflict with the
reserved purpose, then the conflicting data must be escaped before
forming the URI.
The “reserved” syntax class above refers to those characters that are
allowed within a URI, but which may not be allowed within a
particular component of the generic URI syntax; they are used as
delimiters of the components described in Section 3.[/quote]
On with your question: How do you plan to differentiate which URIs are redirected to A, ABC, ygh and OP1? You cannot make multiple redirections without some sort of marker to let Apache know what to do - the Apache daemon is not clairvoyant!
You might benefit from reading the mod_rewrite tutorial at http://dk.co.nz/seo as it contains explanations and sample code. It’s helped many SitePoint members over the years and should help you, tYou might benefit from reading the mod_rewrite tutorial linked in my signature as it contains explanations and sample code. It’s helped may members and should help you, too.
thanks for the explanation, it help, i know that the apache deamon is not clairvoyant. may be my question was’nt clear. so : my goal is to make an automatic naming for the folder to improve my website SEO, it’s not about:
/myfolder-ABC/
/myfolder-ygh/
/myfolder-OP1/
i dont want to create them manually, its about one hundred folders or more thanks.
Okay, I’m not clairvoyant either! Of course, late at night, my brain may not be functioning sufficiently to understand the problem.
Because mod_rewrite isn’t written for creating new directories, please let me recommend doing that with a PHP script because:
PHP can test to determine whether the directory exists
PHP can create a new directory (and assign read/write/execute permissions)
PHP is a very good language to use to create a decision tree.
IF ABC, ygh and OP1 are your clients (or users), they KNOW their “username” (directory) and should be made to enter their directory with the correct URI (with an error handler to catch errors in URIs).
Sorry, still an incomplete explanation but the mod_rewrite tutorial should give you a place to start if you’re intent on using that for (???) but you’ll have an easier time creating directories with PHP.
dklyn instead of Aiptek, sorry for username, I didn’t drank my coffee yet
i think i will I’ll change my mind about naming folders, and try other solution, i’ll post it later once done.
thanks a lot.