I am trying to route a single blog post from a url
The url looks like this : http://localhost/news/post/1/post-title-slug
And my .htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]`
And my routing file I am currently using a library called nezamy/route
$route->get('/post/?/?', function($postid,$page) {
include 'post.php';
});
When I do this my css, js and images is renamed as well to something like this: http://localhost/news/post/1/css/main.css