Increase the memory-limit in php

When you run wordpress under xamm, Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 334230 bytes) in D:\xampp\htdocs\test.php on line814.  1. Open \xampp\apache\bin\php.ini .Do not go to the directory of phpt to find php5.ini . 2. Search”memory” and get the following: ;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 60     ; […]

How to use htaccess to change site.com/directory/ to site.com/ ?

If you only want https://kingphp.com/money directory become https://kingphp.com, use:RewriteRule ^catalog/$ / [L] If you want all directories become https://kingphp.com, use: RewriteEngine On RewriteBase / RewriteRule ^([^/]+)$ /catalog/$1 [L] RewriteRule ^$ /catalog/ [L] Note:If you have other subfolders in there (in that catalog dir, you’ll need some additional rule for that also. This will rewrite your […]

How to use mod rewrite forward to a new domain?

For examples, when we visit www.google.com, we want it redirect to https://kingphp.com, we can use the following code: Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] The code posted above should be used on the old server.

How to redirect folders (and all the link)

For example, if we want to redirct https://kingphp.com/php/ to https://kingphp.com/wordpress/ We could use mod_rewrite. Put this in your .htaccess file Options +FollowSymLinks RewriteEngine On RewriteRule /php/(\w+).html /wordpress/$1.html [R=301,L]

Using .htaccess pointing domain to specific directory

If a server hosting 2 domains, we can use this .htaccess (on the root) to point the 2 different domains to 2 Directories on the same server: RewriteEngine On RewriteBase / # pointing for the domain domain1.com to folder1 ReWriteCond %{HTTP_HOST} domain1.com ReWriteCond %{REQUEST_URI} !folder1/ ReWriteRule ^(.*)$ folder1/$1 [L] # pointing for the domain domain2.com […]

WordPress Permalinks Does Not Work in xampp Setup

xampp provides a convenient way to quickly and easily install and setup a web server that works without much configuration. However, permalinks feature won’t work with the default installation of xampp, even though you can properly customize the permalinks structure to create the .htaccess file.

.htaccess redirect ALL traffic to another domain

.htaccess code: redirect 302 / http://www.mynewdomain.com you can also redirect access via PHP, using the header() function: // Permanent redirect: header(‘HTTP/1.1 301 Moved Permanently’, true); header(‘Location: http://www.location.com/’); // Temporary redirect (note that sending the ‘Location’ header automatically sends a 302 redirect unless it is explicitly overwritten, as it is above): header(‘Location: http://www.location.com/’);

How to insert PHP code into HTML?

To be able to use php code on a page with an extension other than .php, you need a server which supports .htaccess files. To add an extension to be parsed for php, create or edit a file called .htaccess (with the dot first) containing the following line:

The application failed to initialize properly( 0xc0150002).Click on OK to terminate application

Today when I install XAMPP (www.apachefriends.org), an error comes out “The application failed to initialize properly( 0xc0150002).Click on OK to terminate application”, I search the internet and found the method to resolve the problem, it is very easy, just download and install the Visual C redistributable: http://www.microsoft.com/downloads/info.aspx?na=90&p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=200b2fd9-ae1a-4a14-984d-389c36f85647&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2fe%2f1%2fc%2fe1c773de-73ba-494a-a5ba-f24906ecf088%2fvcredist_x86.exe