Enable and Configure mod_rewrite for Apache on CentOS 7

The mod_rewrite module is enabled by default on CentOS 7. If you find it is not enabled on your server, you can enable it by editing 00-base.conf file located in /etc/httpd/conf.modules.d/ directory.

Add or uncomment the following line:

Save and close the file, then restart the httpd service:

Once the mod_rewrite module… Continue reading Enable and Configure mod_rewrite for Apache on CentOS 7

.htaccess Redirect to specific Sub-Domain based on User Agent

You can use mod_rewrite’s RewriteCond directive to redirect user’s to different websites depending on what device they are using. .htaccess Rules Following rewrite rules will redirect iphone, ipad and ipod users to different sub domains based on the user agent.

For all the other user agent requests, default rewrite rules will be applied.

Allow Cross Domain Fonts with CORS

Some browsers like IE doesn’t allow cross-domain fonts by default – unless you set a Access-Control-Allow-Origin header to the font. cross-domain fonts mean fonts that are not hosted on your domain and may be CDN based fonts or fonts that are hosted on other websites. It seems that for security reasons browsers do not allow… Continue reading Allow Cross Domain Fonts with CORS

How to Change port in XAMPP

By default Xampp server is run on 80 port, if you want to change this port to something, just follow the below steps it is pretty easy. Before you start changing anything, make sure you don’t have Xampp running somewhere, especially services as they are running behind the scene. How to change we need to… Continue reading How to Change port in XAMPP

Published
Categorized as Apache Tagged

YII – The mcrypt PHP extension is not installed.

Recently i tried to install YII2 ,i got “The mcrypt PHP extension is not installed.” error. In this post, I will show you how to fix this issue and show you how to install mcrypt. What’s mcrypt? MCrypt is a replacement for the old crypt() package and crypt(1) command, with extensions. It allows developers to… Continue reading YII – The mcrypt PHP extension is not installed.

Published
Categorized as Apache Tagged

Website speed tip: leverage browser caching

In the past, performance was not considered one of the top priorities when developing web applications, but nowadays web app performance is most important for success, and Google also taking site speed into account in the search rankings. So In order to get better rankings & to provide best user experience we should use suitable… Continue reading Website speed tip: leverage browser caching

How to Enable cURL on Windows & Apache Server?

PHP Tutorials

Firstly, locate your php.ini file, which in my case is in the default directory of xampp\php and edit with a notepad. Locate and uncomment (remove the ; at the start of the line) the following lines:

Restart your Apache server. To test if cURL is successfully running on your Windows Apache Server, run phpinfo();… Continue reading How to Enable cURL on Windows & Apache Server?

How to Increase file size upload limit using .htaccess ?

Most of the web Hosting providers give access to overriding the .htaccess, To Increase file size upload limit via .htaccess just copy the bellow settings into your .htacess file and put it in your web root directory

post by : arjunphp.com