local files that exist to be generated.Rewritecond%{request_uri} ^/sites/([^\/]*)/files/styles/[^\/]*/public/((. *)) $Rewritecond%{document_root}/sites/%1/files/%2-fRewriterule ^ (. *) $ $ [qsa,l]# Otherwise, send anything else that's in the files directory to the# production server.Rewritecond%{request_uri} ^/sites/[^\/]*/files/.*$Rewritecond%{request_uri}!^/sites/[^\/]*/files/css/.*$Rewritecond%{request_uri}!^/sites/[^\/]*/files/js/.*$Rewritecond%{
This is my. htaccess file
# BEGIN qiaoyixuan
RewriteEngine onRewriteBase /qiaoyixuan/RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
# END qiaoyixuan
I want all address requests to be rewrite to index.php,When the request http://localhost/qiaoyixuan/2015, the page is displayed normally,CSS and JS error when requesting http://localhost/qi
help you. Http://mengkang.net/17.html
If you are too lazy to look, say the general idea:
First, the server Apache or Nginx to pseudo-static rewrite to the actual addressSecond, the URL is generated in PHP when the URL is the rule (and this rule on the route file) to replaceThird, to ensure that the user access is a pseudo-static address, when the user access to non-pseudo-static address when the PHP side according to $_SERVER['REQUEST_URI'] determine whether it is non-pseudo static address, if
In the root directory of the Thinkphp app, the content in htaccess is:
Rewriteengine on
Rewritecond%{request_filename}!-d
Rewritecond%{request_filename}!-f
Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l]
It is no problem that the same code is put into the WAMP environment to turn on the same settings.Solving!!!
Reply content:
In the root directory of the Thinkphp app, the content in htaccess is:
Rewriteengine on
Rewriterule ^ (?! Admin|user|inde\.php|config\.php|%{http_host})%{http_host} [R=301.L]
In addition to the home page and admin directory and user directory, as well as index.php and config.php all jump to the homepage ...
Reply to discussion (solution)
Rewriteengine Onrewritebase/rewritecond $!^ (admin\/(. *) |$) Rewritecond $!^ (user\/(. *) |$) Rewritecond $!^ ( index.php (. *) |$) Rewritecond $!^ (config.php (. *) |$) rewriterule ^ (. *) $ index.php [L,
This post was last edited by Xiongmzh on 2013-11-20 15:24:09
My group: A B C
Default group: A
B.xxx.com, point to Group B,. htaccess as follows;
Options +followsymlinks
rewriteengine onrewritecond%{request_filename}!-drewritecond%{request_ FILENAME}!-frewriterule ^ (. *) $ index.php/b/$1 [qsa,pt,l]
Now, when accessing http://b.xxx.com/, it is the index method in the Indexaction controller under the A packet (but the URL in the addre
Rewrite is a kind of server rewrite pulse technology, it can make the server can support URL rewriting, is a kind of latest popular server technology. It also enables the ability to restrict access to a site by a specific IP.Tools/Materials
Apache
Method/Step
rewrite flag R[=code] (Force redirect) Force external redirection G (force URL to is gone) forces the URL to gone and returns the 410HTTP status code. The P (Force proxy) enforces the use of proxy forwarding. The
Friends who have been familiar with the. htaccess file do not understand some of the opposite syntaxes. I often see a rule followed by some capitalized L NC R QSA or something. Do you know what they mean? OK. The following article briefly describes the syntax PARAMETERS OF THE. htaccess file.
Chain | C (link to the next rule)
This flag links the current rule to the next rule. It produces the following effect: if a rule is matched, the subsequent rule
thinkphp has four URL modes:0 Normal Mode http://localhost/imooc/index.php?m=Indexa=userid=1Normal mode is the traditional get parameter to specify the current access to the module and operation, there is a conflict between M and other page backend values are either, back-end value method, or rewrite the naming of different patterns// The default module gets the variable // default controller Get variable // default action gets variable1 default mode pathinfo mode http://localhost/imooc/index.ph
/article/list/tag/public/css/captain.css
Currently, the following rules are used:
RewriteEngine on RewriteCond % {REQUEST_FILENAME }! -D RewriteCond % {REQUEST_FILENAME }! -F RewriteRule ^ (. *) $ index. php/$1 [QSA, PT, L]
Ask experts for advice and solve the problem
Reply content:
I made a simple php framework and used"?var=val1var2=val2"Url view loading is normal,apacheTo beautify the url, useHide index. php by using the. htaccess ruleA
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) to match the suffix of the file.
7.convert the suffix of .html to. php.
^/?([a-z/]+)\.html$ $1.=301,L]。
8. Create a link without a file suffix
^ /? ([A-z] +) $1.% {REQUEST_FILENAME}. php-^ /? ([A-zA-Z0-9] +) $ 20.1.20.20.request_filename=.html-^ /? ([A-zA-Z0-9] +) $1 .. php is t
support Internet Explorer */Zepto. Z = function (dom, selector) {dom = dom | []; dom. _ proto _ = $. fn; dom. selector = selector | ''; return dom ;}; // '$. zepto. isz' checks that the given object is a Zepto set and can be overwritten by the plug-in. isZ = function (object) {return object instanceof zepto. z;};/*** '$. zepto. init 'is the jQuery reference for Zepto' $. fn. init '* uses the css selector and an optional context (to handle various special cases) * this method can be overwritten
thinkphp Hidden index.php after 500
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 conte
Options +followsymlinks
Rewriteengine on
Rewritecond%{request_filename}!-d
Rewritecond%{request_filename}!-f
Rewriterule ^ (. +?\. ( ICO|GIF|JPG|JPEG|PNG|HTML|JS|CSS|MAP|TTF|WOFF|WOFF2)) $/static/$1 [L]
Rewritecond%{request_filename}!-d
Rewritecond%{request_filename}!-f
Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l]
That's what I wrote. htaccess file code, but I put the file in the project directory, still can't
way!It can be seen from the initialization of two base classes! The default common will instantiate an attempt to $view, and the API mode base class will only execute the initialization method in your instance class. In addition, people are more concerned about the htaccess Rewriterule ^web (. *) indexph p/ 1 [qsa,pt,l] Rewriterule ^interface (. *) i nt er fa ce ph p/ 1 [qsa
Scene configuration, configurable multiple databases, load on demandArray Merge: Array_merge (), key name same after overwrite front array_merge_recursive (); Key name same, key value mergeFor URLs with Http://localhost:8089/index/index/index this format to be in the. htaccess file rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l] The index of the sentence plus?, representing the matching port number, complete Rewriterule ^ (. *) $? index.php/$
Apache:1. The mod_rewrite.so module is loaded in the httpd.conf configuration file2. AllowOverride None Change None to all3. Save the following content as a. htaccess file in the same sibling directory as the application portal file+followsymlinks-multiviewsrewriteengine onrewritecond%{REQUEST_ FILENAME}! -Drewritecond%{request_filename}! -^ (. *) $ index.php?/$1 [qsa,pt,l]PHP5.5 or more[Apache] Rule this line:Rewriterule ^ (. *) $ index.php/$1 [
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.