gojobs gojobs - 2 months ago 4x
PHP Question

Change URLs in PHP through .htaccess

I am asking question after so many attempts to do this. Found many results on this website but none of them worked for me.

I have a website built in PHP (no any CMS) that has URLS like


I just want to convert all URLS like these


Here is my .htaccess content:

DirectoryIndex index.php
RedirectMatch 404 ^/admin/$
RedirectMatch 404 ^/admin/uploads/$
ErrorDocument 404 /page_not_found.php
<Files index.php>
Order deny,allow
deny from all
allow from all

Please tell me how to do this? I think I need to do some change in just .htaccess


Try this:

RewriteEngine on
RewriteRule ^([0-9]+)/?$ /job_detail.php?job_id=$1 [L]