Remove .php extension with .htaccess -
yes, i've read apache manual , searched here. reason cannot work. closest i've come having remove extension, points root directory. want work in directory contains .htaccess
file.
i need 3 things .htaccess
file.
i need remove .php
a. have several pages use tabs , url looks page.php#tab - possible?
b. have 1 page uses session id appended url make sure came right place,
www.domain.com/download-software.php?abcdefg
.
is possible? in doing this, need remove ".php" links in header nav include file? should ie "<a href="support.php">support</a>" <a href="support">support</a>?
- i force "www" before every url, it's not
domain.com
,www.domain.com/page
. - i remove trailing slashes pages.
i'll keep looking, trying, etc. being in sub directory cause issues?
gumbo's answer in stack overflow question how hide .html extension apache mod_rewrite should work fine.
re 1) change .html .php
re a.) yup, that's possible, add #tab
url.
re b.) that's possible using qsa
(query string append), see below.
this should work in sub-directory path:
rewritecond %{request_filename}.php -f rewriterule !.*\.php$ %{request_filename}.php [qsa,l]
Comments
Post a Comment