...

how to Add underscore to .htaccess file

macleodjb
05-25-2009, 05:32 PM
Hi guys,

I have a url like this

example.com/folder/folder/a_unique_article.html

my .htaccess file is giving me an error when i have the underscore within the field. So my question is how can i add it to my .htaccess file so it doesn't give an error.

here is what i have already.


RewriteEngine On
RewriteRule ^folder/([A-Za-z0-9-]+)$ folder/category.php
RewriteRule ^folder/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)\.html$ folder/article.php?title=$2


Thanks for the help.

schleppel
05-27-2009, 12:13 AM
How are you adding it? (What is the code that is giving you the error?)

Try
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^folder/[-a-zA-Z0-9_]+$ /folder/category.php [QSA,L]
RewriteRule ^folder/[-a-zA-Z0-9_]+/([-a-zA-Z0-9_]+)\.html$ /folder/article.php?title=$1 [QSA,L]



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum