Hello:
I am trying to figure out how I can rewrite this url
http://mydomain.com/some_username
to work as http://mydomain.com/profile.php?Username=some_username
anyone know how that can be done?
Hello:
I am trying to figure out how I can rewrite this url
http://mydomain.com/some_username
to work as http://mydomain.com/profile.php?Username=some_username
anyone know how that can be done?
Simple header redirect. For each directory, just include a index.php file, grab the url, chop off the ending, and forward them on to the next page.
~Brett
hmm i can not see how that would do it. i was thinking of mod_rewrite
So you've just answered your own question then. But mod_alias would probably do the job and it's simpler.
http://www.phpbuilder.com/board/showthread.php?s=&threadid=10300322&highlight=modrewrite
hey thanks weedpacket, i have never hurd of mod_alias before, what is it and how would i use it in my case?
That's why the creators of such software and programs create a compendium of answers to what you need to know. Read the Apache sites documentation on their server package. Here's a page dealing with mod_alias:
http://httpd.apache.org/docs-2.0/mod/mod_alias.html
~Brett
Yes, I did read that before you had pointed out, yes i also googled it and i still could not find the answer to my situation.
Sends an external redirect based on a regular expression match of the current URL
RedirectMatch (.*).gif$ http://www.anotherserver.com$1.jpg
And you can use RegEx in it too. So you could have something like:
RedirectMatch /(.*)$ [url]http://www.domain.com/index.php?username=[/url]$1
thanks, where do i put that? in my .htaccess file?
Y'know, I guess there's just not much point writing documentation...
http://httpd.apache.org/docs-2.0/mod/mod_alias.html
RedirectMatch Directive
Description: Sends an external redirect based on a regular expression match of the current URL
Syntax: RedirectMatch [status] regex URL
Context: server config, virtual host, directory, .htaccess
Override: FileInfo
Status: Base
Module: mod_alias
Must resist urge to be an @$$
Aye, that's true Weed, but if they didn't write it, use normal folks who look for answers would be lost.....
~Brett