简体   繁体   中英

how to redirect clean url of htacces in my site?

I have search many times but not find correct answer

i want to this

my url is domain.com/privacy.php

and i want to domain.com/privacy/

it's possible if yes please tell me how.

use something like

Options +FollowSymlinks All -Indexes
RewriteEngine On

RewriteBase /

RewriteRule ^privacy.php$ privacy/

To re-write the URL:

Options +FollowSymlinks
RewriteEngine On
RewriteBase /
######
############
############
######
RewriteRule ^privacy/ privacy.php [NC]

Update: Do you want privacy.php to redirect you to the /privacy too?

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

Not sure what you mean but this is my answer to my guess at what you mean

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM