0

I'm having some problems removing the extension of the following rewrite rule..

RewriteRule ^([^/]*)\.html$ /index.php?id=$1 [QSA,L] 

How can I get rid of the extension and use it like domain.com/23 instead of domain.com/23.html?

1 Answer 1

1

You can use:

RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)$ /index.php?id=$1 [QSA,L] 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.