ciprian
ciprian

Reputation: 443

rewrite url using htacess.

In this point i have this structure. /quote-submit-php/ what i'd like to do is to rename the last '-' into '.' so it's going to be like this quote-submit.php basically a single character. Thanks

Upvotes: 0

Views: 52

Answers (1)

anubhava
anubhava

Reputation: 786091

Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteRule ^(.*)-(php)$ $1.$2 [L]

Upvotes: 1

Related Questions