I'am quite new with htaccess. I have successfully created .htaccess file with following rules to redirect user with pretty url.
My actual url
http://localhost/domain.com/Job-Details.php?Job_ID=30
What i want to achieve
http://localhost/domain.com/30
My Current htaccess
RewriteEngine On
RewriteBase /domain.com/
# Get the URI-path directly from THE_REQUEST variable
RewriteCond %{THE_REQUEST} ^(GET|HEAD)\s/(.*)\.php [NC]
# Search friendly URLs for job detail page
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9]+)$ Job-Details.php?Job_ID=$1 [NC,L,R=301]
Issues I'am facing
- Redirection with pretty url not happening. I'am stil seeing old url
- Using mentioned htaccess when i enter pretty url in address bar directly then page displays fine but url gets changed to my current url automatically.
any idea what wrong i'am doing here.