brsy
nah mang
- May 12, 2011
- 1,530
- 272
I am trying to get my .htaccess working as it should. My current .htaccess looks like the following:
This code is suppose to turn the index.php?url={value} into /{value}. It works for the most part, but when I try to do the same for my backed, it doesn't work as it should.
What's wrong with the .htaccess above?
Code:
RewriteEngine On
RewriteRule ^(|/)$ index.php?url=$1
RewriteRule ^([a-zA-Z0-9_-]+)(|/)$ index.php?url=$1
This code is suppose to turn the index.php?url={value} into /{value}. It works for the most part, but when I try to do the same for my backed, it doesn't work as it should.
Code:
RewriteEngine On
RewriteRule ^(|/)$ index.php?url=$1
RewriteRule ^([a-zA-Z0-9_-]+)(|/)$ index.php?url=$1
RewriteRule ^(|/)$ backend/index.php?url=$1
RewriteRule ^([a-zA-Z0-9_-]+)(|/)$ backend/index.php?url=$1
What's wrong with the .htaccess above?