This topic has been archived. It cannot be replied.
-
工作学习 / 学科技术讨论 / Sever 那头(PHP)是如果处理虚拟的URN?比如:www.blog.com/myblog。myblog并不是一个真实的URN。Sever 在收到 www.blog.com/myblog 后,根据 myblog 从 database 取值丢回给 client。但我想不明白 PHP 是如果写的。那位高人请指点一下。谢谢先。我试着骨骼了一下,但不知道用什么关键词,没成功。
-registereduser(立牌坊);
2009-11-8
{212}
(#5666277@0)
-
Sorry, 应该说myblog并不是一个真实的URL。因为没有这样一个 www.blog.com/myblog/index.html 存在在那。
-registereduser(立牌坊);
2009-11-8
(#5666283@0)
-
My question indeed is not about the parse_url, or how to retrieve the data according to /myblog. My question is about the structure of php files. Since /myblog does not really exist, how the home page such as index.html being triggered?
-registereduser(立牌坊);
2009-11-9
(#5666698@0)
-
在joomla里面,用了 rewrite和seo 结果就是www.abc.com/blog.
其实就是www.abc.com/index.php?blog 类似这样的代码。
在index.php里面获得post的属性然后跳转。
-kooris(kooris);
2009-11-10
(#5671048@0)
-
I did not use joomla. I am learning to write every piece of codes.
-registereduser(立牌坊);
2009-11-16
(#5684231@0)
-
oneway to do this is via rewrite, all requests will be passed to a Master controller. Typically, its first task is routing, mapping url to a (page) controller. Yes, for SEO. say a prod page, comparing /production?id=## with /production/pretty-name-foo/##seeing a path/to/page and trying to find path/to/page.php.....do not think about it, keep up
-elecskunk(elecskunk);
2009-11-12
{92}
(#5676516@0)
-
Is this correct? Somehow, it does not work.RewriteEngine On # Turn on the rewriting engine.
RewriteRule ^www.blog.com/([A-Za-z0-9-]+)?$ www.blog.com/index.php?uname=$1 [NC,L] # Insert the pattern of "index.php?uname=".
-registereduser(立牌坊);
2009-11-16
{340}
(#5684227@0)
-
This is the file .htaccess.
-registereduser(立牌坊);
2009-11-18
(#5689559@0)
-
感谢捧场,仔细看了httpd.conf...========================
DocumentRoot "/path/to/www/root"
AliasMatch ^(?!/static/) "/path/to/www/webapp/mastercontroller.php"
=======================
- webapp not under www/root, no need htaccess
- use alias not rewrite (sorry, my bad). you still have untouched request_url
- leave /static/stuff to apache, that is its specialty; final compiled (minimized) js/css also here
-elecskunk(elecskunk);
2009-11-19
{383}
(#5690778@0)
-
Would you please more specific? I am embarrassed, but I have to say I do not understand your comments. The hosting service I am using is a commercial company. www.mydomain.com/index.php will be their /public_html/index.php. How do I do this?
-registereduser(立牌坊);
2009-11-24
(#5702380@0)
-
Please!!!如何use alias?Keyword please for Google search.
-registereduser(立牌坊);
2009-12-25
(#5763860@0)
-
玩PHP的,水平都是这样?
-nicetomeetyou(蓦然回首彩虹跨天地);
2009-11-13
(#5677973@0)
-
你你你你你你
-registereduser(立牌坊);
2009-11-16
(#5684271@0)
-
For so many days passed, you even did not provide any useful information. Damn it!
-registereduser(立牌坊);
2009-12-2
(#5721435@0)
-
What I intend to say is: Design pattern, url you see from the screen is a key, not a specific file name on web server. the key is sent to server, and server build dynamic page based on it.
-nicetomeetyou(蓦然回首彩虹跨天地);
2009-12-2
(#5721496@0)
-
谢谢牛哥,但是没有Keyword我没法Search。道理我懂,但不会干。
-registereduser(立牌坊);
2009-12-25
(#5763844@0)
-
这是Apache的功能,和php其实没太大关系
-dzhu(Daniel);
2009-11-21
(#5696034@0)
-
谢谢告知。你有进一步的建议吗?比如什么命令?
-registereduser(立牌坊);
2009-11-25
(#5704099@0)
-
先google “PHP MVC",1个小时基本上就能看个半懂,然后实践一下,做个hello world,google "Yii", 这个是个framework, 实现MVC很容易
-dzhu(Daniel);
2009-12-11
(#5740626@0)
-
谢Daniel哥。刚开始学习PHP MVC,好像正是我要的。我的Project就剩两个问题了。Redirection 和在Firefox上右Click。
-registereduser(立牌坊);
2009-12-25
(#5763856@0)
-
不客气,我也刚学。
-dzhu(Daniel);
2009-12-25
(#5764652@0)