[英]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 '.' /quote-submit-php/
我想做的是将最后一个'-'重命名为'。 so it's going to be like this quote-submit.php
basically a single character. 因此基本上就像一个
quote-submit.php
一样。 Thanks 谢谢
Enable mod_rewrite and .htaccess through httpd.conf
and then put this code in your .htaccess
under DOCUMENT_ROOT
directory: 通过
httpd.conf
启用mod_rewrite和.htaccess,然后将此代码放在DOCUMENT_ROOT
目录下的.htaccess
:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)-(php)$ $1.$2 [L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.