Ad
.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.
Ad
Answer
try this one :
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /viewitem.php?typedp=$1&viewdp=$2 [QSA, L]
take a look at : Mod Rewrite Generator
Ad
source: stackoverflow.com
Related Questions
- → Laravel 5: Apache php http authentication
- → Htaccess negation
- → OctoberCMS error in frontend - frontend is not accessible firing error "Default value for parameters with a class type hint can only be NULL"
- → How to give access execute specific php file in server?
- → 301 Redirection from no-www to www in wordpress
- → Cyclical redirection at the start laravel 5 project
- → Can't route in Laravel framework
- → How to benefit of prerender.io services if my Apache server doesn't allow a proxy
- → OctoberCMS installation MYSQL error
- → Redirect 301 htaccess prestashop
- → Permissions "public" folder Laravel
- → .htaccess affect other file url
- → How i can redirect from "www.mywebsite.com////" to "www.mywebsite.com"?
Ad