Click me

Miva Merchant And The .htaccess File

MIVA MERCHANT D. What's an .htaccess file - A text file located on the web server which allows you to make server configuration changes on a per directory basis. An .htaccess files applies to its current directory and all sub directories. Files placed in lower directories will overwrite rules in higher directories. -htaccess anafomy of .htaccess Directory Index 3 Force the WWW • Allow you to set the default index page. Example: • This ensures that the search engines see and as the same page. Directorylndex /mm5/merchant.mvc?Screen=SFNT • You can include multiple fles in the list. If the first one is not found it will try the next: • RewriteCond %(HTTP_HOST} !^ RewriteRule ^(.* J$ (R=301) Directorylndex /mm5/merchant.mvc?Screen=SFNT index.html home.php www homepage homepage http:// 4 404 Error Page • Set which page the user sees when they reach a page that does not exist 404 OOPS... • Code: ErrorDocument 404 /mm5/merchant.mvc?Screen=NFTD 5 301 Redirects Allows you to redirect one page to another page. This is useful when the page URL changes and you want to redirect the old url to the new url in order to keep your search engine rankings. • Example: Redirect 301 /contact-page.php • Note: The regular 301 redirect syntax above only works if the page you are redirecting from actually exists on the server. If the link you are redirecting from is a re-written url then you need to use a rewrite rule to 301 redirect it properly. single Space Redirect 301 url you want to redirect drt you want to redirect to 6 Rewrite Engine • Mod_Rewrite is a powerful module that allows you to do URL manipulations. • It must be enabled in the .htaccess file by adding this line of code: RewriteEngine on • There are two main type of URL rewrites that you'll use with Miva Merchant to accomplish 301 redirects. •If URL you are redirecting contains a query string (ie there is a ? in the url, Then you need to use the following rewrite: RewriteCond %(QUERY_STRING) AScreen=PROD&Product_Code=r.* JS RewriteRule ^(.* J$ (R=301.L) anatomy of .htaccess • If your URL you are redirecting does not contain a query string then you will use this format: RewriteCond %(REQUEST_URI) ^/page/CTGY/(.* JS (NC) RewriteRule ^(.* J$ [R=301,L) begginning of string everything after the? Server Variable end of String RewriteCond %(QUERY_STRING} ^Screen=PROD&Product_Code=.* J$ RewriteRule ^.* J$ [R=301,L) helds value of 1st wild card everything after the .com no case drop query string there is one. RewriteCond %(REQUEST_URI) ^/page/CTGY/(.* J$ (NC) RewriteRule ^(.* J$ [R=301,L) Matches any single character c.t will match cat, cot. cut. etc. + Repeats the previous match one or more times a+ matches a, aa, aaa, etc a* matches all the same things a+ matches, but will also match an empty string. * Repeats the previous match zero or more times. ? Makes the match optional. colou?r will match color and colour. A Called an anchor, matches the beginning of the string na matches a string that begins with a $ The other anchor, this matches the end of the string. as matches a string that ends with a. ) Groups several characters into a single unit, and captures a match for use in a backreference. (ab)+ matches ababab - that is, the + applies to the group. For more on backreferences see below. [] A character class - matches one of the characters cluoalt matches cut, cot or cat. ") Negative character class - matches any character not specified cf^/t matches cat or c=t but not c/t

Miva Merchant And The .htaccess File

shared by rmmojado on Jan 25
If you have questions about .htaccess files, 404 error pages, 301 redirects and other webpage elements in relation to your Miva Merchant store, you’re not alone. Here is a graphic that I put togethe...


Miva Merchant


Unknown. Add a source


Did you work on this visual? Claim credit!

Get a Quote

Embed Code

For hosted site:

Click the code to copy


Click the code to copy
Customize size