|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Redirecting
Alright... Lets say I want to set something up, like php.net has(or codewlakers for that matter) where you can do php.net/funcname
Now, I doubt they have a directory for every function... How would I go about setting something like this up... I guess more what I want is this... Lets say I go to php.net/bob It redirects me to http://www.php.net/manual-lookup.php?pattern=bob&lang=en How do you get that bob out of the URL and into another pages query URL section... |
|
#2
|
||||
|
||||
|
RE: Redirecting
Actually, I think it's most likely Apache's mod_rewrite function.
|
|
#3
|
|||
|
|||
|
RE: Redirecting
Thats what I was afraid of....
tirdun: How would you do that?? If you are going to php.net/bob, the server should be looking for php.net/bob/index.php, which does not exist.... Unless I'm overlooking something there... |
|
#4
|
|||
|
|||
|
RE: Redirecting
There is a fairly simple way to do this. Assuming you have access to your httpd.conf, or .htaccess:
1. Set a custom 404(not found) page: Code:
ErrorDocument 404 /redirect.php 2. Create redirect.php 3. Create query.php This will mimic the php.net behaviour, as near as I can tell, without mod_rewrite. |
|
#5
|
|||
|
|||
|
RE: Redirecting
brut:Thats what I was looking for, I'll give this a try, thanks alot
|
|
#6
|
|||
|
|||
|
RE: Redirecting
Alright, so I haven't tested your method yet brut, but I think the webserver will let us use mod_rewrite, so is there perhaps a tutorial that someone can point me to that can help me learn to use mod_rewrite? Or if anyone could tell me how to write teh rule that would like map
www.website.com/members/1 to www.website.com/members/index.php?id=1 or a tutorial would be great, just anything... |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > Redirecting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|