Help with .htaccess
This is an open discussion with 7 replies, filed under Troubleshooting.
Search
I'm no REGEX expert, but I think your input evaluation needs to start with a ^ and end with a $:
e.g.
RewriteRule ^(.*)$ /index.php?id=$1
something along those lines....
Thanks but it still doesnt work for me :)
Try some of these resources.
Hopefully, some of these will be of help.
Here's another resource, with a further list of links at the bottom of the article. Maybe a bit basic, but you never know what might hold the key!
It says it's for "beginners", but it's quite full!
@Pat, I don't have much .htaccess experience either, but I do have regex experience, so I thought it might be worth giving this a try:
RewriteRule ([^/]*)$ index.php?id=$1
If there's any way to output the value of id
, that would probably quite helpful too.
sorry scott it doesnt work for me...
i'm starting to think this .htaccess is not working... is it possible that the .htaccess doesnt work??
I did Redirect 301 / http://www.google.com/
which should've redirected everything to google, but nothing happens...
Pat, A quick look at the server error logs will give you the answer. My guess is that mod_rewrite isn't enabled on your server. If you can, edit Apache's httpd.conf file and uncomment these two lines:
#LoadModule rewrite_module modules/mod_rewrite.so #AddModule mod_rewrite.c
Create an account or sign in to comment.
sorry this isn't about symphony... but i'm having a little php trouble here
i want to get domain.com/abc123 and have the abc123 part sent as a GET variable...
after 4 hours of googling, none of these sites make sense at all... according to these sites this should have worked
RewriteEngine On RewriteBase / RewriteRule (.*) index.php?id=$1