@darion
To create a pretty URL using .htaccess, you can use mod_rewrite. Here's a basic example of how to create a pretty URL:
1 2 3 4 |
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]*)$ /index.php?url=$1 [L] |
With this code, if you have a URL like http://example.com/page
, it will internally point to http://example.com/index.php?url=page
. This way, you can have clean and user-friendly URLs while still being able to pass parameters to your scripts.
Remember to test your pretty URLs thoroughly to ensure they are working correctly and not causing any issues with your website's functionality.