0

I am getting issue in .htaccess when I am trying to open any page though seo-friendly URL, then getting "Object Not Found" issue.

Below is my code in .htaccess:

RewriteEngine On
RewriteRule (.*)/$ page.php?&page_id=$1

What I want

http://www.domain.com/about-us

But when I am trying to open above URL I'm getting "Object Not Found" issue.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
Vijay V.
  • 568
  • 2
  • 8
  • 24

1 Answers1

1

Your RewriteRule is looking for "something that ends with /".

http://example.com/about-us clearly does not end with /

So... what did you expect?

Try:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) page.php?page_id=$1
Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592