Queryphp framework tutorial 3: seooptimization removing index. php at the end of .html

Source: Internet
Author: User
Tutorial topic. csdn. netu201002261243bf3dc5-795f-4fa5-8 queryphp framework tutorial three SEO optimization to remove index. php at the end of the. html
First two tutorials
Http://topic.csdn.net/u/20100228/22/3bea834b-efc0-4aa0-af4a-a4923af8b60c.html
Http://topic.csdn.net/u/20100226/12/43bf3dc5-795f-4fa5-861a-2f7bf8fd0cd6.html
Download the latest version 0.9.6.8beta
Http://code.google.com/p/queryphp/downloads/list

Test index. php removal

Add a line to the C: \ WINDOWS \ system32 \ drivers \ etc \ hosts file
The content is as follows:
127.0.0.1 localhost
192.168.0.10 www.app.com

192.168.0.10 is the IP address used by apache.
* The IP address in the ID indicates that you can access your local Nic.

Http://www.app.com/queryphp/project/index.php/default/index
After configuration, you want to make it like this.
Http://www.app.com/queryphp/project/default/index.html
Remember to add multiple lines in the inc. ini. php file.
Allow configask'html'{}'.html '; or remove the previous //.
In the VM configuration test, AllowOverride FileInfo uses. htaccess configuration.


Order allow, deny
Allow from all
AllowOverride FileInfo

DocumentRoot "D:/work"
ServerName "www.app.com"



Put the. htaccess file under the project directory, which is under each project directory.
Index. php file

RewriteEngine On

# Uncomment the following line, if you are having trouble
# Getting no_script_name to work
# RewriteBase/

# We skip all files with. something
# RewriteCond % {REQUEST_URI} \... + $
# RewriteCond % {REQUEST_URI }! \. Html $
# RewriteRule. *-[L]

# We check if the. html version is here (caching)
RewriteRule ^ $ index.html [QSA]
RewriteRule ^ ([^.] +) $ response 1.html [QSA]
RewriteCond % {REQUEST_FILENAME }! -F

# No, so we redirect to our front web controller
RewriteRule ^ (. *) $ index. php [QSA, L]


------------------------
The url_for () method is used in the program.


The template shows the example in CURD mode.

"> Edit
"> Delete

After the download, go to apache and set www.app.com in c:/windows/system
Http://www.app.com/queryphp/project/curd/index

Can the content be displayed?


If the following line of content is removed from the framework \ config \ inc. ini. php file
// Configure configask'html'{}'.html '; // enable the url ending with. html


Http://www.app.com/queryphp/project/curd/index.html access
Can I see the content?

All links end with. html. What should we do if we don't want to end with .html?
"> Delete

Url_for (url, true); do not end with html
The deletion will become like this.
Http://www.app.com/queryphp/project/curd/delete/id/2

------ Solution --------------------
Wow top

------ Solution --------------------
I have tried these frameworks for LZ.
------ Solution --------------------
Discussion
I have used several tools. Currently, it is basically the symfony + doctrine ORM class.
I am using it myself, but I feel too big to write a small one myself.

------ Solution --------------------
Repeatedly released to the French style
------ Solution --------------------
For beginners who are doing OA or enterprise websites, what framework should they use?
------ Solution --------------------
Supported ~~~~~~~~~~~~~~~~~~~~~~ Learning.
------ Solution --------------------
Learned

------ Solution --------------------
Urlrewrite is hard to understand.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.