i write .htaccess in folder directory and run my website but nothing happend in url
index.php and add connect to showpage.php?id=14
i wish to switch to items/14
Options +FollowSymLinks RewriteEngine On # Turn on the rewriting engine RewriteRule ^products/([0-9]+)/?$ showpage.php?id=$1 [NC,L] # Handle product requests
The .htaccess should be enabled to operate. Within the apache config AllowOverwrite rewrite should be enabled. A brief example
<Directory /foo/bar/> AllowOverride All </Directory>
.htaccess won't like magic rewrite links you've already put into your code. It's just a tool for Apache to deal with incoming demands.
index.php file, alter the link from
products/14. Reload the page inside your browser. So long as the rule is properly setup (it appears correct), clicking the hyperlink should show the best URL within the address bar, and also the right page content too.