how to redirect all dynamic pages to single php page using .htaccess

In core PHP sometimes we need to create dynamic pages for all the post added in the backed,if we have hundreds of post we don’t want to create 100 pages to display all the post.Here am going to display how we can use slug to identity each post and pass that slug in the URL suppose we have to create a URL like post_POSTNAME_page.so each post having the same URL structure we will replace POSTNAME with slug, that we created from the post tile or post name
so i want to call all post_POSTNAME_page to a single php page ,we can do it with the help of .htaccess .in the below post am going to explain you how to redirect all dynamic pages to single php page using .htaccess. First i need to create a php page name postpage.php
In the postpage.php we can get the value of slug by using the get method

$page_slug=$_GET[‘slug’];

by using this page slug we can use mysql to fetch all data related to that post

Here is the rules to redirect all dynamic pages to single php page using .htaccess


RewriteEngine On
Options +FollowSymLinks
RewriteRule post_(.*)_page$   postpage.php?slug=$1

See how it going to work

https://www.tutorialshore.com/post_Indian_history_page

It will call postpage.php?slug=indian_history

So if we use $_GET[‘slug’], we will get page slug Indian_history by using this slug we can access the post content for Indian history
same way you can add pages also

RewriteRule page_(.*)_content$ page.php?slug=$1

why google shows the wrong title for my website

Nowadays many of the website show different title character in google search page ,this is actually done by the hackers, the will replace our original title with Japanese ,Slavic languages, Indo-European languages, East Slavic languages, Balto-Slavic languages any of the languages with our website title this is why google shows the wrong title for my website. Here am going to explain how to remove that hack or spammers and bring back our current title to google search result page.

See below Images google shows the wrong title for my website

why google shows the wrong title for my website

How to remove wrong title for my website

Step 1
Open google and search

site:tutorialshore.com japan **replace tutorialshore.com with yourdomain.com

site:tutorialshore.com Slavic

open the pages code, that listing in the google search result and remove any unwanted code if their that may be done my hackers

Step 2

Open your sitemap.xml page and double confirm all the URL listed in the site map are correct URL in the website, if you find anything regenerate sitemap and resubmit to google webmaster

Step 3

Sort Files by date of modified and find out any new files update without your permission

Step 4

check file permission if any having 444 permission delete that files and upload the same files from your backup.

Step 5

Open google webmaster account

report the hacked pages and remove it with the help of google webmaster

Step 6

Resubmit Sitemap and Recrawl

Open Crawl => Fetch as google =>Fetch and render

See in picture

why google shows the wrong title for my website

How to regenerate HDFC bank new ATM OTP

For security reason all banks are planning to upgrade their ATM card to chip Level, so bank will automatically send new ATM to registered address and the 6 digit OTP they will send as SMS to your mobile number,the validity for that ATM is 30 days,so if you not used within that days it will expire. so the question is How to regenerate HDFC bank new ATM OTP, here are going to explain you how to regenerate HDFC bank new ATM OTP.

Send SMS

Send below sms to 5676712
REPIN [LAST FOUR DIGIT OF YOUR ATM CARD NUMBER]

if you send this sms ,within second you will get a 6 digit otp,we can use this otp to set new atm pin from any of the hdfc bank atm,you should type the new opt followed by your registered mobile number
if your not registered with phone banking,you have to register to phone banking first,below is the structure to register for phone banking

Send SMS to Register Phone banking

Send an SMS to 5676712
REGISTER [YOUR CUSTOMERID][LAST FOUR DIGIT OF YOUR ACCOUNT NUMBER]

Usage of for loop in Jquery syntax with example

Here am going to explain the use of for loop in JQuery with an example

Add a page ajax_angular_view.php with response format

{"Company1":"IBM","Company2":"TCL","Company3":"GOOGLE"}

HTML Area

 <div><input id="update_company_name_comapny1" type="text" value="" /></div>
<div><input id="update_company_name_comapny2" type="text" value="" /></div>
<div><input id="update_company_name_comapny3" type="text" value="" /></div>
var company_id=1
$.ajax({
                url: "ajax_angular_view.php?action=view_company_info_by_id&company_id="+company_id,
                type: "post",
                success: function(data) {
					
                    var obj = JSON.parse(data);
		for(var k in obj) {
					$("#update_company_name_"+k).val(obj[k])
 
                     }
		console.log(obj);
                     
                }
            });