Durgaprasad
Durgaprasad

Reputation: 323

.htaccess seo friendly url not found issue

I am trying to create SEO Friendly URL using htaccess php.

Here is the original URL :

http://www.example.in/viewitem.php?typedp=bus&viewdp=bus-seat-test-item

expected SEO Friendly URL :

http://www.example.in/bus/bus-seat-test-item

Using the following rule in .htaccess

Options +FollowSymLinks
RewriteEngine on
RewriteRule typedp/(.*)/viewdp/(.*)/ viewitem.php?typedp=$1&viewdp=$2

But it shows as not found 404 error.

I am new to this concept.

any help appreciated.

Upvotes: 0

Views: 260

Answers (1)

Saeed M.
Saeed M.

Reputation: 2361

try this one :

RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /viewitem.php?typedp=$1&viewdp=$2 [QSA, L]

take a look at : Mod Rewrite Generator

Upvotes: 3

Related Questions