Forum Moderators: phranque
We have access to a server that will be hosting a site shortly. While waiting for the domain to propogate, I'd reaallly like to do some testing, however I'm having some trouble.
The Setup
The server has us set up like this:
[IP_ADDRESS...]
The Screwup!
The following is my htaccess file:
RewriteEngine on
Options +FollowSymlinks
RewriteBase /~username/
RewriteRule ^\.htaccess$ - [F]
RewriteRule ^be/(.*)/$ be/template.php/$1 [L]
RewriteRule ^be/$ be/template.php [L]
RewriteRule ^de/(.*)/$ de/template.php/$1 [L]
RewriteRule ^de/$ de/template.php [L]
RewriteRule ^se/(.*)/$ se/template.php/$1 [L]
RewriteRule ^se/$ se/template.php [L]
RewriteRule ^ru/(.*)/$ ru/template.php/$1 [L]
RewriteRule ^ru/$ ru/template.php [L]
RewriteRule ^(.*)/es/$ es/template.php/$1 [L]
RewriteRule ^es/$ es/template.php [L]
RewriteRule ^(.*)/$ template.php/$1 [L]
RewriteRule ^$ [oldsite.com...] [L]
This file works great for requests to the root template, i.e. [IP_ADDRESS...] redirects as requested when you enter the root (http://IP_ADDRESS/~username/) but chokes (hello 500) when I try and send it to another language, i.e.
i.e. [IP_ADDRESS...] Why?Why?Why?[6]Why?[/6]runs around room in small circles...
I do not have access to error logs, though I may put in a request...
Any ideas? :-]
Also, why is there a rewrite for .htaccess...
Thanks Birdman, I was monkeying around with that one, consider it 'cut'!
Leading Slash
I have tried a zillion things, but at your request ;-] I tried again, and here's the result:
The requested URL /be/template.php was not found on this server.
It seems then it looks to the root for the file. I've tried appending 'more path' before the trailing slash (makes sense, no?) but no luck...
I'd suggest you drop the RewriteBase directive, eliminate all but two or three RewriteRules, and try to get it working in simplified form. Once you have a single, correctly-working example, you can then incrementally add additional code sections (for additional languages, in your case) and test to make sure it still works.
It's always easier to get simple code working. Simple code is also likely to garner more people willing to help get it working, as it requires a smaller mental effort and commitment of time.
Jim