You are here: Re: How do you pass a variable via a "pseudo-directory" or URL prefix? « PHP Programming Language « IT news, forums, messages
Re: How do you pass a variable via a "pseudo-directory" or URL prefix?

Posted by Jerry Stuckle on 10/20/06 02:38

jonnyblazed@gmail.com wrote:
> On Oct 19, 6:16 pm, Andy Hassall <a...@andyh.co.uk> wrote:
>
>>On 19 Oct 2006 15:12:50 -0700, "jonnybla...@gmail.com" <jonnybla...@gmail.com>
>>wrote:
>>
>>
>>>I've searched everywhere for this but I'm not sure exactly what to
>>>search for.
>>
>>>What I am trying to do is pass a variable to a php script via the URL.
>>>However, I don't want to use the standard "?name=value format." I want
>>>to either pass the variable as "value website.com" or
>>>"website.com/value" where the script is stored in some directory
>>>"website.com/script/index.php" and the value gets stored in a variable
>>>declared within my php script.
>>
>>>I have seen this done but I just need some guidance on how to go about
>>>doing it. Look up "mod_rewrite" for Apache.
>>
>>--
>>Andy Hassall :: a...@andyh.co.uk ::http://www.andyh.co.ukhttp://www.andyhsoftware.co.uk/space:: disk and FTP usage analysis tool
>
> I've read a little bit now about mod_rewrite. So, just testing it with
> a simple rule I can't get it to work... I placed the following at the
> top of my .htaccess file:
>
> RewriteEngine on
> RewriteRule shortcut u/user/index.html
>
> I am using GoDaddy and they have mod_rewrite installed and enabled by
> default on all their servers. So, I know thats not the issue.
>
> I've also tried using a few regexp's like ^?/shortcut$?, ^/shortcut$,
> ^/?shortcut$ and so on, but none seem to work...
>
> Am I doing something wrong?
>
>
> PS
> u/user/index.html DOES exist.
>
>
>

(Top posting fixed)

Try alt.apache.configuration. They should be able to help you with this
apache configuration problem.

P.S. Please don't top post. Thanks.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация