Hi All, I am not expert in htaccess but i use htaccess for one of my website after read online. First i use 404 page setup by htaccess Second i change all .php extenstion to .html and both are working fine. Code are as below Options +FollowSymLinks RewriteEngine on ErrorDocument 404 /bulk-email-lists.php RewriteCond %{THE_REQUEST} (.*)\.html RewriteRule ^(.*)\.html $1.php [L] Now i want to rewrite my page like domain.com/blog.php?id=new-page to domain.com/blog/new-page or with .php or .html extension. I add below code to above htaccess code and after this htaccess is not working. So please suggest us that how to use both codes in htaccess. All codes are as below Options +FollowSymLinks RewriteEngine on ErrorDocument 404 /404page.php RewriteCond %{THE_REQUEST} (.*)\.html RewriteRule ^(.*)\.html $1.php [L] RewriteBase / RewriteRule blog/(.*)/ blog.php?id=$1 RewriteRule blog/(.*) blog.php?id=$1 Please guide me with your experience. It would help me lots in learn additionally about htaccess. Hope for quick response. Thanks Suraj Anjaana
Now i got it just comment a line and its working fine for domain.com/blog.php?id=few-words to domain.com/blog/few-words Options +FollowSymLinks RewriteEngine on ErrorDocument 404 /bulk-email-lists.php RewriteCond %{THE_REQUEST} (.*)\.html RewriteRule ^(.*)\.html $1.php [L] #RewriteBase / RewriteRule blog/(.*)/ blog.php?id=$1 RewriteRule blog/(.*) blog.php?id=$1 Now i want to make it domain.com/blog/few-words.html but its not working when i add few things as below. Getting not found error. RewriteRule blog/(.*).html$ blog.php?id=$1 or RewriteRule blog/(.*)\.html blog.php?id=$1 Please help. Thanks Suraj Anjaana