How to remove Base URL Duplication?

I just examined your URL http://www.homecredit.ph/wp-content/uploads/home1/homecre1/public_html/files/News-26.jpg and code and noticed that, you are saving your image in http://www.homecredit.ph/files/News-26.jpg path but trying to access from upload directory of WordPress. /home1/homecre1/public_html/files/News-26.jpg – this is the path stored in database for your attachment ID. /home1/homecre1/public_html/ – This is your root directory where WordPress installed. So better save only … Read more

How to Rewrite the URL

WordPress will generate rewrite rules internally once you have selected a permalink format. You can do so under Settings > Permalinks in your WordPress admin area. WordPress will attempt to write to your .htaccess file. If it can’t, it will provide you with some rewrite code you can copy/paste into your .htaccess file. Either way, … Read more

How to add 2 variable rewrite rule?

You’ll need to write a rewrite rule to parse the URL and pull out the value of gallery-name and gallery-item-name. This will be tricky as there is nothing to distinguish your proposed URL structure from a hierarchical page structure. If you can throw in something that is always the same for all gallery URLs like … Read more

Homepage cannot be found

Visiting your domain name redirects to domain.com/index.html and that’s where your issue is – WordPress doesn’t know what index.html is and throws 404 error. The redirection might be caused by many things, hard to tell just by visiting your homepage. Are you sure that you’ve setup the WordPress URL and Home URL settings correctly? How … Read more

Rewriting / Redirecting request outside wordpress

Normally, to add rewrite rules in WordPress there is the generate_rewrite_rules filter. From there you can call the function add_external_rule ($wp_rewrite->add_external_rule($rule)) where you could add your rule which not maps to index.php. Unfortunately WordPress will try to write this rule into the .htaccess file. But maybe this could be helpful.