directory: D:/webroot/redmine/Initialize Database: rake DB: migrate
Configure Apache and add the following script:
Loadmodule fcgid_module et/MoD/mod_fcgid.soDefaultinitenv rails_env Production# Set the following environment variables to ensure correct DNS resolution# If this parameter is not set, getaddrinfo: No address associated with hostname will be reported.Defaultinitenv path "C:/Windows/system32; C:/windows; C:/Windows/system32/WBEM ;"Defaultinitenv systemroot "C:/Windows
thinkphp How to implement the domain name with a different length of string, enter a different controller method
For example:
Coding1 a string of 5-bit letters plus numbers
Coding2 a string of 6-bit letters plus numbers
How to implement the A method of demo.me/coding1 into a controller
Demo.me/coding2 the B method into the B controller
Reply to discussion (solution)
There are many ways. You can go through the portal first to enter a method test in test to determine the degree of coding
System linux+php5.3
tp3.1.2
Modify Httpd.conf's mod_rewrite.so module semicolon according to the Handbook of TP
And then there's allowoverride none to change none to all (this place in the httpd.conf there are 5, I have changed into all, do not know whether it is correct, or just need to modify a place on it? )
Url_model set to 2 This is also set to 2 in the config file, and then in writing one. Htaccess is placed in the root directory of the site, the content is as follows
Rewrite
is as follows :Rewriterule ^/? ([a-z/]+) \.html$ $1.php [L]This is not a Web redirect, so the visitor is not visible. Let him as a permanent redirect (visible), change the FLAG to [r=301,l]. 8. Create a no file suffix name linkIf you want to make the link to your PHP site more concise and easy to remember-or to hide the file's suffix name, try this :The code is as follows :Rewriterule ^/? ([a-z]+) $ $1.php [L]If the site is mixed with PHP and HTML files, you can use rewritecond First to determi
thinphp Apache URL Rewrite issue
Example: HTTP://WWW.XXXX.COM/INDEX.PHP/INDEX/INDEX/N/50
Rewrite this URL to:
http://www.xxxx.com/50
Without affecting other modules
Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l] This is just the index.php removed,
When you visit the homepage, you need to http://www.xxxx.com/50 this effect.
The others are: Http://www.iwebo.dev/Setting/index
Just get rid of index.php.
Written like this:
Rewriterule ^ (. *) $ index.php/i
Options +followsymlinks #新规则 #RewriteEngine on #QSA Mapping #RewriteRule old website New URL [QSA] Rewriteengine on Rewritecond%{request_filename}!-d Rewritecond%{request_filename}!-f Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l] #修改默认访问文件 Deny from all DirectoryIndex index.html index.php Order Deny,allow301 redirect modifies the default
%{request_filename}.php-fRewriterule ^/? ([a-za-z0-9]+) $ $1.php [L]Rewritecond%{request_filename}.html-fRewriterule ^/? ([a-za-z0-9]+) $ $1.html [L]If the file is suffixed with. PHP, this rule will be executed.9. Check for specific parameters in query variablesIf there is a special parameter in the URL, you can use Rewritecond to identify whether it exists:Copy the Code code as follows:Rewritecond%{query_string}!uniquekey=Rewriterule ^/?script_that_requires_uniquekey\.php$ other_script.php [
final result.
An empty array is assigned if the results is not assigned a value. * @param seed Initial set */function Sizzle (selector, context, results, seed) {var match, Elem, M, NodeType,//QSA I,
Groups, old, nid, Newcontext, Newselector; * * Preferreddoc = window.document * * Setdocument method completes some initialization work */if (context? context.ownerdocument | | contex
T:preferreddoc)!== document) {setdocument (context); Context = Con
your PHP site more concise and easy to remember-or to hide the file suffix, try this: Rewriterule ^/? ([a-z]+) $ $1.php [L]If the site is mixed with PHP and HTML files, you can use Rewritecond first to determine if the suffix file exists, and then replace it: Rewritecond%{request_filename}.php-fRewriterule ^/? ([a-za-z0-9]+) $ $1.php [L]Rewritecond%{request_filename}.html-fRewriterule ^/? ([a-za-z0-9]+) $ $1.html [L]If the file is suffixed with. PHP, this rule will be executed.9. Check for spec
In order to facilitate the search engine crawl (in other words is false static), the following is the rules of the URL rewrite, the effect of looking at my Chinadigger link address. My current rewrite rule:
Copy Code code as follows:
[Isapi_rewrite]
# 3600 = 1 hour
Cacheclockrate 3600
Repeatlimit 32
# Protect Httpd.ini and Httpd.parse.errors files
# from accessing through HTTP
# WordPress Rewrite rules#
rewriterule/tag/(. *)//index\.php\?tag=$1
Rewriterule/(About-me|a
skipped. T=mime-type (Force MIME type) enforces MIME types NS (used only if no internal sub-request) is used only for not internal child requests NC (no case) does not distinguish between large lowercase QSA (query string append) Append request string NE (no URI escaping of output) is not an output escape special character For example: rewriterule/foo/(. *)/bar? arg=p1/%3d$1 [R,ne] will be able to correctly convert/foo/zoo to/bar?arg=p1=zed PT
http://www.xmgho.com/archives/783.html use. htaccess to bind the domain name to the subdirectory, as long as your space server must support Apache's rewrite function, only in order to use the. htaccess. If your space is Linux server is generally turned on by default. Bind domain NameLogin The domain name Management desk (such as dnspod) to resolve the domain name needed to bind to your space;Login to the virtual host/space management desk (such as WAN) bound domain name to space;First build a TX
selector, further determine if the context is empty,does not empty when the context is wrapped as a Zepto object after the Find method is executed,//the role of the wrapper context here is that the incoming contexts might be a DOM object, perhaps a Zepto object, The purpose of calling the. Find method is to be compatible with a number of objects under the Zepto object array, in fact find is also a loop call QSA (Zepto encapsulated Query method, the b
configure additional Web server rewrite rules.Implement rewrite1.Apache you will need to add the. htaccess file to the same sibling of the portal file with the following rewriteengine on%{request_filename}-d %{request_ FILENAME}-F ^ (. *) $ index.php/$1 [qsa,pt,L]The Mod_rewrite.so module (remove the previous #) is loaded in the httpd.conf configuration file in the 2.Apache configuration file, and then allowoverride none changes to None3.
AddEncoding gzip. js ForceType application/x-javascript
AddEncoding gzip. css ForceType text/css
RewriteEngine On RewriteBase/# wordpress static website support. if you set it, there will be the following three lines of RewriteCond % {REQUEST_FILENAME }! -F RewriteCond % {REQUEST_FILENAME }! -D RewriteRule. /index. php [L] # When I read css and js, I will re-import it to gzip. php RewriteRule (. *. css $ |. *. js $) gzip. php? $1 [L] indic
if the file does not exist
% {REQUEST_FILENAME }! -% {REQUEST_FILENAME }! -.? /404.-f matches the existing file name, and-d matches the existing path name. Before you perform 404 redirection, this code determines whether your file name and path name exist. You can also add one on the 404 page? Url = ^ /? (. *) $/404.php? Url = $1
6. rename the Directory
^ /? Old_directory/([a-z/.] +) $ new_directory/$1 [R = 301 ,. "(note that not all characters are included in front of the escape character)
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.