user1910774
user1910774

Reputation:

i have removed the .php extension using .htaccess but next part will not work

htaccess :

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]

from dis line it will not work

RewriteRule ^blog/([a-zA-Z]+)/$ blog.php?cat=$2

My url http://localhost/Seo/blog.php?cat=SEO

i want to convert it into http://localhost/Seo/blog/cat/SEO

extension are removed but next blog part is not working

Upvotes: 0

Views: 63

Answers (1)

Jon Lin
Jon Lin

Reputation: 143946

You're missing a "cat" in your rule:

RewriteRule ^blog/cat/([a-zA-Z]+)/$ blog.php?cat=$2

Since your URLs are going to look like http //localhost/Seo/blog/cat/SEO

Additionally, you'll want to put that rule before the rules that you already have.

Upvotes: 1

Related Questions