-1

I have Link :

http://localhost/account/user?id=123

And i want rewrite to :

http://localhost/account/user/123

So how i can do that, thanks you.

UPDATE

This is my .htaccess

Options +FollowSymlinks
Options -MultiViews
RewriteEngine on 

RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 

RewriteRule ^(.*)$ $1.php
RewriteCond     %{SERVER_PORT} ^80$
RewriteRule     ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

ErrorDocument 404 https://localhost/404.php
ErrorDocument 403 https://localhost/403.php

1 Answers1

-1

Use this in your htaccess i am assuming user is a php file.

RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 

RewriteRule ^([\w-]+)/([\d]+)$ $1.php?id=$2 [QSA,L]
Abhishek Gurjar
  • 7,426
  • 10
  • 37
  • 45