mod_rewrite & .htaccess - can't get it to work!
I'm trying to do something very simple. I want the following url...
...to rewrite to...
I've tried adding the following to my VirtualHostX Directives but it doesn't seem to work...
I've been googling and searching forums for the past two days. Nothing i try seems to work. Any suggestions??
http://myvirtualhost/var/
...to rewrite to...
http://myvirtualhost/index.php?p=var
I've tried adding the following to my VirtualHostX Directives but it doesn't seem to work...
Options FollowSymLinks
RewriteEngine on
RewriteRule ^/([a-z]+)$ index.php?p=$1 [L]
I've been googling and searching forums for the past two days. Nothing i try seems to work. Any suggestions??
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Try adding your rewrite rules inside an .htaccess file instead of the directives box. That's where I place mine.
-
Inappropriate?Well, i have the VirtualHostX method working. I tried to move everything to an .htaccess file and that didn't work for some reason?? Would love some suggestions if you have them. Here's what I did that *is* working...
The parent directory for my projects has the following set up in my [username].conf file
<Directory "/Users/[username]/Dropbox/Sites">
Options FollowSymLinks Indexes MultiViews
AllowOverride All AuthConfig
Order allow,deny
Allow from all
</Directory>
Then i have the following entered in the Directives field in VirtualHostX
RewriteOptions Inherit
RewriteEngine on
RewriteRule ^/([a-z]+)\.html$ /index.php?p=$1
RewriteRule ^/([a-z]+)[/]?$ /index.php?p=$1
So, now /xyz.html, /xyz, and /xyz/ all rewrite to /index.php?p=xyz
However, If i move the very same rules to an .htaccess file, it breaks???
I’m still perplexed
Loading Profile...



EMPLOYEE