views:

216

answers:

2

I've just installed WAMP, and now I'm trying to copy my files from my server to my local machine. I have a rewrite rule like

RewriteRule .* /index.php?url=$0 [L,QSA]

But that seems to redirect to http://localhost/index.php when I actually want http://localhost/mysite/index.php. So I figured

RewriteBase /mysite

Would do the trick, but that doesn't appear to be the case. Doesn't seem to work that way from my readings. Is there any way that I can fix this without changing my rewrite rules? I basically just want the base of my site to be in some subfolder.

A: 

if you’re using relative paths in your substitution, you don’t need to alter the base URI path:

RewriteRule .* index.php?url=$0 [L,QSA]
Gumbo
I think this causes problems when the user is in a sub-sub-folder. i.e. if they're at /mysite/folder/page it should still point to /mysite/index.php?url=/folder/page
Mark
(rather than /mysite/folder/index.php?url=whatever)
Mark
A: 

I have .htacces like:

RewriteEngine On RewriteRule ^en/$ index.php?page=index&lang_id=2 RewriteRule ^contact.html$ index.php?page=contact RewriteRule ^en/contact.html$ index.php?page=contact&lang_id=2 ...[and so on]

In my site i have a swtich language button(image).My basic language is in Ro and and i want to swtich it into En. So, the point is that on a real server, the switcher works. On my local server, wamp, when I try to switch the language, in my browser it appears the text translated (as they are stocked in my database), buu it doesn't recognized the css styles, images,...it appears only the text.

Where is the problem ? I'll appreciate any help. Thanks.

Danny
You should [ask this as a new question](http://stackoverflow.com/questions/ask) instead of posting it as an answer.
Tim Stone