|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (20)
View page history| If some pages should be mod_rewrit-ed even if are not present on default pages, you will need do following steps: |
| # Open Cofiguration->Settings-> Use mod_rewrite for external links _"Cofiguration->Settings->Webshop"_ in webshop administration panel. |
| # Set option "use mod_rewrite for external links" to true. # Add to .htaccess in site root following rules: |
| # Set option _"Use mod_rewrite for external links"_ to true. At setting page below you can see generated rules. # Check your _.htaccess_ file in site root folder and add all generated rules, if file not contain next section: |
| {code} # ModRewrite Section <IfModule mod_rewrite.c> RewriteEngine On |
| RewriteBase <path_from_site_root> # Rules |
| {code} # Add/edit rules {code} |
| RewriteCond %{REQUEST_FILENAME} !-f |
| RewriteRule ^(.*)ajax.php$ ajax.php [L,QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)async.php$ async.php [L,QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^(.*)(/ext/.*|admin/.*)$ RewriteRule ^(.*)/templates/(.*)$ templates/$2 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^(.*)(/templates/.*|admin/.*)$ RewriteRule ^(.*)images/(.*)$ images/$2 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^(.*)(/templates/.*|admin/.*)$ RewriteRule ^(.*)/ext/(.*)$ ext/$2 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^(.*)(/templates/.*|admin/.*)$ RewriteRule ^(.*)/includes/(.*)$ includes/$2 [L] RewriteCond %{REQUEST_FILENAME} !-f |
| RewriteCond %{REQUEST_URI} !^(.*)(index.php|gif|css|txt|jpg|js|swf|/admin/.*|/images/.*|templates/.*|includes/.*|ext/.*|install/.*)$( [OR] <path_to_rewrited_file>) RewriteRule ^(.*)$ index.php?mod_rewrite&$1 [L,QSA] |
| </IfModule> |
| {code} |
| # Instead <path_from_site_root> you will need to insert your base webshop path. {quote} *Example:* _If your shop has somedomain.com/subdomain/webshop URL, you need use /subdomain/webshop/ instead <path_from_site_root>_ {quote} |
| # ( \[OR\] |
| <path_to_rewrited_file>) |
| This rule is optional. If mod_rewrit-ed access need only for some pages on the shop, you should use URL to this pages instead < path_to_rewrited_file>. _<path_to_rewrited_file>_. |
| {quote} *Example:* |
| _RewriteCond %\{REQUEST_URI\} ^(.\*)someshoppage/somepage/product/details/.\*$_ ^(.\*)some_shop_page/some_page/product/details/.\*$_ |
| {quote} |
| # If this possibility need for several pages use \[OR\] keyword for this. |
| # If you need this for several pages: use \[OR\] keyword. |
| {quote} *Example:* |
| _RewriteCond %\{REQUEST_URI\} ^(.\*) someshoppage/somepage/product/details/.\*$ some_shop_page/some_page/product/details/.\*$ \[OR\]_ |
| _RewriteCond %\{REQUEST_URI\} ^(.\*) someshoppage/somepage/.\*$ some_shop_page/some_page/.\*$ )_ |
| {quote} |
| # Default values for mod_rewrite rules also can be copied from “Use mod_rewrite for external links” setting page. In this case <path_from_site_root> is already configured. Also that rules configure all shop pages for use mod_rewrited urls. |
{note:title=Note} |
| * For more details about rewrite rules see [Apache: Module mod_rewrite|http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html] |
| * Keyword \[OR\] need to be placed on one line with previous RewriteCond rule and through space from the last sign symbol of this condition |
| {note} {warning:title=Warning} |
| If both settings "Use mod_rewrite" and "Use mod_rewrite for external links" are enabled, please use mod_rewrite rules only in .htaccess file. |
| If both settings _"Use mod_rewrite"_ and _"Use mod_rewrite for external links"_ are enabled, please use mod_rewrite rules only in _.htaccess_ file. |
| {warning} |