OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to create SEO friendly URL through .htaccess code for php site

  • Thread starter Thread starter Sonu
  • Start date Start date
S

Sonu

Guest
I have to make the URL of my site a SEO friendly URL and I tried some .htaccess code but it didn't happen. currently the URL of my site is this:- https://www.sarkariresultz.net/post...ist-officers-so-various-post-recruitment-2024 But I want the site's URL to be like this:https://www.sarkariresultz.net/latest-jobs/sbi-specialist-officers-so-various-post-recruitment-2024

Code:
RewriteEngine On
Rewritecond %{REQUEST_FILENAME} !-d
Rewritecond %{REQUEST_FILENAME}\.php-f
RewriteRule ^(.*)$ $1.php [L]
RewriteRule ^post/([0-9]+)$ postview.php?id=$1 [L,QSA]
<p>I have to make the URL of my site a SEO friendly URL and I tried some .htaccess code but it didn't happen. currently the URL of my site is this:- <a href="https://www.sarkariresultz.net/post...ist-officers-so-various-post-recruitment-2024" rel="nofollow noreferrer">https://www.sarkariresultz.net/post...ist-officers-so-various-post-recruitment-2024</a>
But I want the site's URL to be like this:<a href="https://www.sarkariresultz.net/latest-jobs/sbi-specialist-officers-so-various-post-recruitment-2024" rel="nofollow noreferrer">https://www.sarkariresultz.net/latest-jobs/sbi-specialist-officers-so-various-post-recruitment-2024</a></p>
<pre><code>RewriteEngine On
Rewritecond %{REQUEST_FILENAME} !-d
Rewritecond %{REQUEST_FILENAME}\.php-f
RewriteRule ^(.*)$ $1.php [L]
RewriteRule ^post/([0-9]+)$ postview.php?id=$1 [L,QSA]
</code></pre>
Continue reading...
 

Latest posts

Top