PDA

View Full Version : .htaccess url_rewrites?



Dave6187
23 Mar 2010, 03:08 PM
Hey guys, i'm new here so sorry if I'm posting this in the wrong forum.

I've been running a phpbb3 forum for a little while now on my site, and I've been wanting to learn more about different forum software. One such software is Kawf (you can see an example of it @ http://forums.quattroworld.com) (http://forums.quattroworld.com)

I know the person who is heading the development project, but he is way less than helpful with setting it up.

the one thing I have a question on right now is that the setup instructions want me to add a virtual host into apache (via httpd.conf), and set this virtual host to use a particular folder as the root, and set up a couple url rewrites. Now, that'd be fine if I had access to the apache config file on my host (I don't have a dedicated server right now, so I've been using hosting24.com, although as an aside, I did try to do it on my local host, and it didn't work, but that's besides the point right now)

So, I set up a subdomain, and set the root directory of it to what the setup instructions wanted me to (if you want you can see it @ http://kawf.ridethevibe.net

now, I just need to do the url_rewrites, and I'm convinced I can do them through a .htaccess file, just not sure how to set it up, the only thing I've ever done with one is set the index file.

so, I was hoping you guys could help me set this file up..

specifically, this is what the setup file wants me to add to apache:


<VirtualHost *:80>
ServerName kawf.org

# ----- start cut here for plesk vhost.conf ----- #
DocumentRoot /usr/local/kawf/config

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteRule ^/(pics/.*|css/.*|robots.txt|favicon.ico|apple-touch-icon.png)$ /$1 [L]
RewriteRule ^/(account|admin|tips)/.*$ /$1.php [L]
RewriteRule ^/.* /forums.php [L]
</IfModule>

<IfModule mod_php5.c>
php_flag magic_quotes_gpc Off
</IfModule>

# Template engine has problems with UTF8. Force single byte charset
AddDefaultCharset ISO-8859-1
# ----- end cut here for plesk vhost.conf ----- #

</VirtualHost>


now, like I said, I made a subdomain, and set the document root to the appropriate folder, but how do i fit the rest of this into a .htaccess file so I can get everything working as it should?

thanks!