.htaccess rewrite/redirect question (going from xxxx.com to xxxx.com/keyword.html)

by 1 replies
3
Hello -

I am trying to get my keyword in my url. Could I rewrite the website.com to website.com/keyword.html to get my keyword in it? It's basically a forum site so renaming the index.php wouldn't be a great idea.

Thanks
#programming #htaccess #question #rewrite or redirect #xxxxcom #xxxxcom or keywordhtml
  • That's pretty easy to do in a .htaccess file - look at httpd.apache.org/docs/1.3/mod/mod_rewrite.html (Apache module mod_rewrite ) although it always hurts my head to look at that file.

    OR - You could just move everything to a new keyword/ subdirectory which will work very well & all internal links will be right without you having to worry too much about things. This is what I've done in the past. You then just need a simple redirect from the / directory to keyword/

Next Topics on Trending Feed