Please help me regarding this issue. I just want to
- Remove .php extension from my files, which is very well done by this
code. - Convert complex php urls to seo friendly urls.
My htaccess file is
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [L]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html [L]
RewriteEngine on
RewriteRule ^search_contents/([0-9]+) search_contents.php?txt_search_contents=$1 [NC,L]
3
Answers
try this
If your search_contents.php is at the root of your project directory then try the following :-
If it is in any folder then try the following :-
1) I have added
RewriteBase
2)
([0-9]+)
to(.*)
, Allow all the parameters instead of only numbers If you required this you can change to number.It may help you.
You can test your rules here: http://martinmelin.se/rewrite-rule-tester/