Hello Any one know the rules for htaccess,

I have follow requirement:

http://www.domainname.com/aboutus/--Need this output

Recommended Answers

All 6 Replies

RewriteEngine on

RewriteCond %{HTTP_HOST} ^www.yoursitename.com [NC]
rewritebase /

RewriteRule ^$ index.php [L]
RewriteRule ^index index.php [L]
RewriteRule ^aboutus  aboutus.php [L]

last post save as .htaccess and next define below code in config page

$Site_URL = "http://yoursitename/";


call now page like this

<a href="<?=SITE_URL?>aboutus">aboutus</a>

try this one.

RewriteRule (.*) $1.php
RewriteRule ^(.*)\$ /$1.html [R=301,L]
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.