Hello all. I could really use some help....
I have a page which currently uses a url with this format:
http://www.mysite.com/users/showuser.php?userid=34
I'd like to use what i have heard of as "clean" domains, subdomains, or third-level domains in this format:
http://users.mysite.com/34
The following is a long list of things i have tried (yes this is making me crazy!). I am testing it on my computer, so I have complete access to all config/access files
I have tried using Alias to change the /users/ directory to the full server path of the showuser.php file.. didn't work
I have tried using simple rewriting (the module was already compiled and i used the "RewriteEngine on" directive in and out fo the the virtualhost) and it does nothing at all. I can't even get it to do a simple redirect to, say, yahoo.com for testing purposes. I don't know much about unix and grep patterns anyway.
I have tried using a virtualhost and pointing the DocumentRoot to the script. This didn't work. I tried changing the server name and alias also... didn't work. This is an example below
NameVirtualHost users.mysite.com
<VirtualHost users.mysite.com>
DocumentRoot /htdocs/users/showuser.php
ServerName users.mysite.com
ServerAlias users
</VirtualHost>
I even tried the following, in hopes of parsing the REQUEST_URI environment variable in php, then redirecting to the "clean" url:
<VirtualHost users.mysite.com>
ErrorDocument 404 /error.php
</VirtualHost>
That didnt' work either. I want to use data from the POST query method anyway, which isn't passed to error docs, to my knowledge.
I am using win98 and apache 1.3.x.
I read alot about the ForceType and AddType directives on this site, but I don't think it applies, since the clean url has no subdirectory. I also read about running Apache as a module. Does this matter? What exactly does this mean anyway? I have read that there are many problems with win98 and using many directives. One more thing - My ISP allows subdomains, and I set up the users.mysite.com DNS on my ISP, but I'm not sure if this matters.
I'd appreciate any help from all you networking folks 🙂