1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

1and1 hosting and mod_rewrite...

Discussion in 'Apache' started by dmri, Apr 17, 2006.

  1. #1
    Does anyone here use 1and1 hosting and also use the mod_rewrite function? I have not been able to get it to work? Tell me about your experience.

    Any other hosting providers that support mod_rewrite? Thanks.
     
    dmri, Apr 17, 2006 IP
  2. Cricket

    Cricket Well-Known Member

    Messages:
    182
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    155
    #2
    If you are on Linux based hosting there shouldn't be a problem. I have used 1and1 for a few years now without a single issue.
     
    Cricket, Apr 17, 2006 IP
  3. dshah

    dshah Well-Known Member

    Messages:
    1,840
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    115
    #3
    I was using 1and1 hosting and couldn't find mod_rewrite working. (I wanted it for mambo SEO). I have to move away from their hosting to get it working.
     
    dshah, Apr 17, 2006 IP
  4. Cricket

    Cricket Well-Known Member

    Messages:
    182
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    155
    #4
    Assuming you were not on Windows based hosting, there should not have been a problem. Did you follow their FAQ concerning mod_rewrites?
     
    Cricket, Apr 17, 2006 IP
  5. dshah

    dshah Well-Known Member

    Messages:
    1,840
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    115
    #5
    Mine was definitely Linux. I think I did all I were supposed to be doing, but couldn't get SE friendly URLs for Mambo/Joomla working at all (which in turn requires mod_rewrite, I had verified other pre-conditions satisfied).

    When I moved to godaddy/beachcomber it worked without any trouble at all.
     
    dshah, Apr 17, 2006 IP
  6. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I've used mod_rewrite on 1and1 hosting. If you have a specific problem, post it and maybe we can help.
     
    exam, Apr 17, 2006 IP
  7. dmri

    dmri Peon

    Messages:
    84
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I have tried several different pieces of code to try to get mod_rewrite to work...but no success. I am trying to clean up my urls. My site is built upon phpbb. Here is an example of a url:

    www.advertisingopinions.com/index.php?c=3

    Here is an example of the code I am using on mod_rewrite (I have tried several different iterations):

    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^c/([^/.]+)/?$ index.php?c=3 
    Code (markup):
     
    dmri, Apr 18, 2006 IP
  8. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #8
    try this:
    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^c\/([^/]+)\/?$ index.php?c=$1 [QSA, L]
    Code (markup):
    and make sure the script is producing URLs like this: www.domain.com/c/8 with an optional trailing slash.
     
    exam, Apr 18, 2006 IP
  9. dmri

    dmri Peon

    Messages:
    84
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Interesting...after posting your suggestion I got a "500 Internal Server Error"

    No luck...
     
    dmri, Apr 18, 2006 IP
  10. dshah

    dshah Well-Known Member

    Messages:
    1,840
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    115
    #10
    Are you using any CMS? (like mambo/joomla)?
    If you want to try out some other hosting, I can offer you test account (through my reseller)
     
    dshah, Apr 18, 2006 IP
  11. Cricket

    Cricket Well-Known Member

    Messages:
    182
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    155
    #11
    Have you called the tech support number for help?
     
    Cricket, Apr 18, 2006 IP
  12. dmri

    dmri Peon

    Messages:
    84
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I am not using a CMS. Just a site with a phpbb back end. Yes, I have called support. Their answer is:

    "Yes, we do support mod_rewrite but we do not offer support for these features."

    Have I hit a wall? Any other ideas?
     
    dmri, Apr 18, 2006 IP
  13. Cricket

    Cricket Well-Known Member

    Messages:
    182
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    155
    #13
    When I do a header check on your domain it shows that you currently have a 302 redirect in place.

    HTTP/1.1 302 Moved Temporarily =>
    Content-Length => 0
    Location => /index.php?c=3?ABCDEFGH

    When I check DNS Check on this domain, it shows the domain parked with GoDaddy.

    Is this perhaps related to why things are not working the way you expect? Or, have you made these changes since you last posted?
     
    Cricket, Apr 18, 2006 IP
  14. dmri

    dmri Peon

    Messages:
    84
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #14
    I have actually mirrored this site on a 1and1 server. This is where I am doing DEV and testing. I also just ran a header check on www.advertisingopinions.com and so no 302.
     
    dmri, Apr 18, 2006 IP
  15. Cricket

    Cricket Well-Known Member

    Messages:
    182
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    155
    #15
    I must be misunderstanding what you are saying/asking because there is definitely a 302 redirect in place on the domain you have posted. My post above is a copy paste of the results, along with the DNS check results.
     
    Cricket, Apr 18, 2006 IP
  16. antonafro

    antonafro Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I just discovered a possible cause of the 1and1 issue.

    After several hours of toying with htaccess and getting nowhere, I discovered that the file was meant to be .htaccess and not the default htaccess.

    The missing fullstop prefix was the cause! DUH. Feel kinda daft now, cause I should have known better.

    Now I can get some well deserved sleep. :eek:


    .
     
    antonafro, Jun 21, 2007 IP
  17. grogg

    grogg Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    I cannot get mod_rewrite to work on 1and1 either. It worked on my other host, but does not work here. Any help?

    RewriteEngine on
    RewriteBase /
    RewriteRule ^book/([a-z]+)\.php$ /index.php?page=$1 [R,L]

    Which should take

    http://www.iwishiworkedthere.com/book/content-home/

    and turn it to
    http://www.iwishiworkedthere.com/index.php?page=content-home
     
    grogg, Dec 23, 2009 IP
  18. amagab

    amagab Well-Known Member

    Messages:
    82
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    111
    #18
    If anyone is still finding this through Google (like me) or wondering elsewhere. I got it working for both Joomla and Wordpress by putting the following in my .htaccess file:

    AddType x-mapp-php5 .php

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/index.php
    RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
    RewriteRule (.*) index.php
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
     
    amagab, Oct 27, 2010 IP
  19. zabalex

    zabalex Member

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #19
    It seams to me that people still have issues enabling mod_rewrite on 1and1.
    I was fighting with new 1and1 hosting account system today, and after doing some research figured out the necessary steps that I can share in here:
    RewriteEngine On #this must be on, on cms distributed htaccess files, it usually is enabled by default
    RewriteBase / #this was disabled on my joomla system, so I had to take out "#" in the beginning of the line.
    RewriteRule ^(.*)$ index.php [F,L] #this was on by default, and following step one line above, made everything work.

    And, yes, the above has to be renamed to:
    ".htaccess" and this has to be done prior to setting SEF options from Joomla control panel. (I don't know if this actually makes any difference, but this worked for me in this order).

    Best regards,
     
    zabalex, Aug 5, 2011 IP
  20. Chamillion

    Chamillion Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Had some trouble with that in the past. User error kind ><
     
    Chamillion, Aug 7, 2011 IP