Redirect request with POST data using .htaccess



RewriteEngine on RewriteCond %{SERVER_PORT} !443 RewriteCond %{REQUEST_URI} string_to_match_in_url RewriteCond %{REQUEST_METHOD} POST RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=307]




Magento: Sample apache virtualhost for your website


Sample apache virtualhost to point to your magento directory and run your local website with specified URL.

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "/var/www/magento/"
    ServerName loca.lho.st
    ServerAlias loca.lho.st
    ErrorLog "logs/error_log"
    CustomLog "logs/access_log" common
</VirtualHost>
Add entry to /etc/hosts too:


127.0.0.1    loca.lho.st
Restart apache (service httpd restart OR service apache2 restart) and point your browser location to:


http://loca.lho.st
and you will see the website running from your /var/www/magento directory.

Comments