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)

6
  • And what is the issue? Please explain what is working and what not.
    – Gerben
    Dec 30, 2011 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: example.com/arg1/arg2/arg3 to 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) Dec 30, 2011 at 17:52
  • Seems like the host doesn't support htaccess.
    – Gerben
    Dec 30, 2011 at 18:11
  • It appears to support htaccess because if I put some odd characters in it I get a 500 error... strange host... Dec 30, 2011 at 19:06
  • So where does your strap.php reside on that new host?
    – anubhava
    Jan 13, 2012 at 19:44

3 Answers 3

8

Found the answer here:

Adding the following fixed the mod-rewrite:

Options -MultiViews

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

1
  • Thanks!!! It worked like a charm on my 1and1 server as well. Very annoying by the way...I was getting crazy!
    – xarlymg89
    Mar 9, 2013 at 11:37
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.

1
  • 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...! Jan 3, 2012 at 15:44
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.