.htaccess examples
redirect url with parameters
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} url_get_parameter_1=(.*)&url_get_parameter_2=(.*)
RewriteRule ^your/old/directory/file$ your/new/path/%1/%2 [R=301,L]
This code redirects :
example.com/your/old/directory/file?url_get_parameter_1=ALBUMS&url_get_parameter_2=HOLIDAY
to
example.com/your/new/path/ALBUMS/HOLIDAY
Force files to download (not be displayed in client/browser)
AddType application/octet-stream .pdf .doc .docx .mov .avi .mpg .zip .rar
Similar entries
- Prevent hotlinking with htaccess and mod_rewrite
- Url manipulation with mod_rewrite and php-catcher for beginners
- Redirect webpages with HTML, PHP, .htaccess, Java+Script, CGI-Perl, ASP.NET and ColdFusion
- Howto protect admin.php / login.php with htaccess password
- How to recursively create md5 and sha1 sum of your files.
- need help for customizing PHP-grep files search
- Search in text files recursively with PHP - Grep
- PHP code examples for beginners
- Get Full Url Path excluding PHP Script's name
- Notepad++ Unable to create directory for file C
- Set auto_prepend_file with .htaccess on Hosteurope managed hosting
- How to setup auto_prepend_file with safe mode and open basedir restriction
- CuteFTP or FTP Client lists just 1998 / 2000 files
- Howto install Volatility (RAM / Memory Forensic Framework) in Windows
- Import big SQL Files under WAMP or LAMP ?
- Page generation time and http-referers with PHP
- How do I secure my web site?
- Photo Album / Picture Gallery Script with PHP
- Using "Linux Find" command to get human readable directory sizes in public_html
- Update / overwrite files and directories recursively with Linux mv - cp commands












Post new comment