PHP framework to HTML website convert without loosing SEO

puskibisht

Newbie
Joined
Apr 12, 2022
Messages
46
Reaction score
11
one of my website in PHP framework and want to develop in HTML without Loosing SEO how could this possible to match more than 200 pages , redirect to the new one is there any alternate way to move site php to html

PHP website page link - xyz.com/post/coursename
in html website - xyz.com/course/coursename.html
 
Any particular reason you're moving away from a dynamic site? Also, what PHP framework?

Also, does your existing website utilize a database in the backend? Are you manually entering the content now?

You can use .htaccess to remove the .html extension from your html pages.

Use something like this

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC, L]

So instead of website.com/page.html - your website will load at website.com/page

WARNING - Don't change the structure of the URLs from post/coursename to course/coursename - Even if you 301 to the new structure, you will 100% lose a lot of rankings and see a lot of ups and downs in SERPs and may not fully recover.
 
If you change your link structure you are going to lose SEO rank hopelessly
Although you may recover from this over a period of time
Just do the right redirection as mentioned (although you may need to tweak it a little, because it's not taking into the consideration that you are also moving folders from post to course)

Apart from knowing about this SEO loss, for the technical part, I would ask better in a dev place like stack overflow or something like that. Nevertheless, maybe someone has some regex skills and can help you to set up the exact redirection
 
Any particular reason you're moving away from a dynamic site? Also, what PHP framework?

Also, does your existing website utilize a database in the backend? Are you manually entering the content now?

You can use .htaccess to remove the .html extension from your html pages.

Use something like this

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC, L]

So instead of website.com/page.html - your website will load at website.com/page

WARNING - Don't change the structure of the URLs from post/coursename to course/coursename - Even if you 301 to the new structure, you will 100% lose a lot of rankings and see a lot of ups and downs in SERPs and may not fully recover.
So , i can move url one by one like which are important for every month i can change 4-5 url we have 10-12 courses so can change one by one after a time period ..?
 
Back
Top