This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /wp-content/uploads/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*) https://CHANGEME.nl/wp-content/uploads/$1 [L,P] | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO `url_rewrite` (`entity_type`, `entity_id`, `request_path`, `target_path`, `redirect_type`, `store_id`, `description`, `is_autogenerated`, `metadata`) | |
VALUES | |
('custom', 0, '$request_path', '$target_path', 301, $storeID, '29-03-2022 | Redirect import | FR | v1', 0, NULL), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = $_SERVER['REQUEST_URI']; | |
if (strpos($url,'?') !== false) { | |
echo '<meta name="robots" content="noindex, follow" />' . "\n"; | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE `ai_posts` SET guid = REPLACE(guid, 'oldurl', 'neworl') WHERE guid LIKE 'oldurl%'; | |
UPDATE `ai_postmeta` SET meta_value = REPLACE(meta_value, 'oldurl', 'neworl') WHERE meta_value LIKE 'oldurl%'; | |
UPDATE `ai_options` SET option_value = REPLACE(option_value, 'oldurl', 'neworl') WHERE option_value LIKE 'oldurl%'; | |
UPDATE `ai_posts` SET post_content = REPLACE(post_content, 'oldurl', 'neworl') WHERE post_content LIKE 'oldurl'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Personal | |
alias clearall="bash ~/htdocs/dev-scripts/clearall.sh" | |
alias clearall-theme="bash ~/htdocs/dev-scripts/clearall-theme.sh" | |
alias mem1="php -d memory_limit=-1" | |
alias ba="bin/accent" | |
alias pa="php artisan" | |
# Magento 2 | |
alias bmsu="bin/magento setup:upgrade" | |
alias bmcc="bin/magento cache:clean" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show local databases on user 'root' | |
alias mysd="mysql -u root -p -e 'SHOW DATABASES;'" | |
# Create new database on user 'root' | |
alias mycd='mysqlCreateDatabase' | |
mysqlCreateDatabase() { | |
PROGNAME=mycd | |
if [[ $# -eq 0 ]]; then |