I want to remove the = and ? from the URL from the get method in PHP. I’m working on the pagination structure of my website and currently this is what the URLs look like:
www.example/test/?page=3
Open in new window
I want it to look like this:
www.example/test/3
How would I rewrite that with htaccess?
This is what my htaccess file looks like right now:
RewriteBase /
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
RewriteCond %{REQUEST_URI} /index\.html?$ [NC]
RewriteRule ^(.*)index\.html?$ "/$1" [NC,R=301,NE,L]