π™π™£π™§π™šπ™–π™‘ π˜Ύπ™€π™™π™šπ™§
1.64K subscribers
6 photos
7 files
34 links
A place for coders ;)
Download Telegram
#php #htaccess

Prevent direct access files using .htaccess

<Files "*.txt">
Order deny,allow
Deny from all
</Files>
Create Pretty URL with any PHP file

create a rule for .htaccess
RewriteEngine On
RewriteRule ^post/([a-zA-Z0-9_-]+)/?$ post.php?id=$1 [L,QSA]


Now you can access:
 /post.php?id=123


To
/post/123/

To access its ID parameter, use $_GET['id']

coded By @BiswaX

#PHP #HTACCESS
πŸ‘8πŸ”₯2