简体   繁体   中英

.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.

try this one :

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

take a look at : Mod Rewrite Generator

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM