0

I'm currently trying to have my 1and1 host an .htaccess file with mod_rewrite enabled, it works on my local wamp, but it doesn't on the server,

Any help would be greatly appreciated!

I've tried removing everything but the mod_rewrite block and the issue still persists...

I've asked 1&1 for support, they closed my ticket without answering... o_O,

Please help!

.htaccess file:

#
# Dream Forgery Settings:
#
AddType x-mapp-php5 .php

RewriteEngine on
RewriteBase /

# Rewrite current-style URLs of the form 'strap.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /strap.php?q=$1 [L,QSA]

Edit:

I don't have access to apache logs as this is a shared hosting, but the functionality expected is to redirect urls for example:

http://example.com/arg1/arg2/arg3

to

http://example.com/strap.php?q=arg1/arg2/arg3

(it is currently giving 404 errors, only the 404 page from 1&1 shows up)

Charles
  • 50,943
  • 13
  • 104
  • 142
Luc Laverdure
  • 1,398
  • 2
  • 19
  • 36
  • And what is the issue? Please explain what is working and what not. – Gerben Dec 30 '11 at 17:44
  • I don't have access to apache logs as this is a shared hosting, but the functionality expected is to redirect urls for example: http://example.com/arg1/arg2/arg3 to http://example.com/strap.php?q=arg1/arg2/arg3 (it is currently giving 404 errors, and the custom 404 page doesn't show up, only the 404 page from 1&1 shows up) – Luc Laverdure Dec 30 '11 at 17:52
  • Seems like the host doesn't support htaccess. – Gerben Dec 30 '11 at 18:11
  • It appears to support htaccess because if I put some odd characters in it I get a 500 error... strange host... – Luc Laverdure Dec 30 '11 at 19:06
  • So where does your `strap.php` reside on that new host? – anubhava Jan 13 '12 at 19:44
  • At the root of the htdocs, this issue is now resolved, I found that "Options -MultiViews" at the top of my .htaccess fixed the issue. Thanks for looking at this anyway! – Luc Laverdure Jan 24 '12 at 17:49

3 Answers3

8

Found the answer here:

Adding the following fixed the mod-rewrite:

Options -MultiViews

http://www.techpopuli.net/news/04/002289.html

Luc Laverdure
  • 1,398
  • 2
  • 19
  • 36
  • Thanks!!! It worked like a charm on my 1and1 server as well. Very annoying by the way...I was getting crazy! – xarlymg89 Mar 09 '13 at 11:37
0

Ran into a similar issue on a mutualised web hosting from 1and1.

Symptoms:

  • frontend homepage ok
  • frontend other page -> err500
  • admin page ok
  • being a 1and1 shared web hosting, no apache error_log available

Joomla 3.9 comes with a .htaccess (in the root directory) that messed it up at line 69:

RewriteBase /

Commenting this line does the trick.

nicolallias
  • 1,055
  • 2
  • 22
  • 51
0

Delete everything but the important bits...

AddType x-mapp-php5 .php 

RewriteEngine on
RewriteBase /

# Rewrite current-style URLs of the form 'strap.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /strap.php?q=$1 [L,QSA]

...and see what happens. The rest of the file isn't necessary—this'll [hopefully] isolate the problem. And 1 & 1 supports .htaccess.

benesch
  • 5,239
  • 1
  • 22
  • 36
  • Just tried this exercise, it however didn't resolve the issue, I'm still seeing a 404 error from 1&1... :(, and strap.php is at the document root, .htaccess is at the document root as well... this is getting very annoying...! – Luc Laverdure Jan 03 '12 at 15:44