Snippets tagged “htaccess”
14 snippets use this tag.
- Apache Files Expires / Apache Set CachesApache
Apache is free and open-source cross-platform web server software. Read and know about Apache Files Expires module and how to set caches with Apache.
- Block direct access to a file over http but allow php script accessPHP
One way to block direct access to a file over HTTP but allow PHP script access is to use a .htaccess file in the same directory as the file.
- Directory index forbidden by Options directivePHP
This error message typically appears when you are trying to access a directory on a web server that does not contain an index.html or index.php file and the web server is configured to prevent users from browsing the directory.
- enable cors in .htaccessPHP
To enable Cross-Origin Resource Sharing (CORS) in an .htaccess file, you can add the following lines:
- How can I disable notices and warnings in PHP within the .htaccess file?PHP
You can disable notices and warnings in PHP by adding the following line to your .htaccess file:
- How Can I Remove “public/index.php” in the URL Generated Laravel?PHP
To remove "public/index.php" from the URL in a Laravel application, you can use the built-in PHP web server or set up a web server with Apache or Nginx.
- How do you enable mod_rewrite on any OS?PHP
To enable mod_rewrite on a PHP server, you will need to make sure that the Apache mod_rewrite module is installed and enabled.
- how to change php version in htaccess in serverPHP
To change the PHP version for your website using an .htaccess file, you can use the AddHandler directive.
- How to Display PHP ErrorsPHP
Often errors occur while executing a PHP application. Read this snippet to learn how to overcome difficulties and display such errors with the help of PHP.
- How to Redirect a Web Page with ApacheApache
To redirect web pages in Apache you should add specific rules to a `.htaccess` on an Apache web server. Learn how to do it.
- How to remove "index.php" in codeigniter's pathPHP
To remove "index.php" from the URL in CodeIgniter, you can use the .htaccess file.
- How to set for specific directory open_basedirPHP
You can set the open_basedir configuration option in the PHP configuration file (php.ini) to specify a specific directory for the open_basedir setting.
- How to set upload_max_filesize in .htaccess?PHP
To set the upload_max_filesize directive in an .htaccess file, you can use the following code:
- Htaccess: add/remove trailing slash from URLPHP
To add or remove a trailing slash from the end of a URL using an .htaccess file, you can use mod_rewrite to rewrite the URL.