Announcement Announcement Module
Collapse

myhosting.com Forum Guidelines

Welcome to the myhosting.com Forums! The purpose of this forum is to allow you to discuss topics relating to hosting and topics of interest with other myhosting.com Customers. The primary focus should relate to issues not generally included in our Wiki or Control Panel, or information not provided by our Customer Support Team. Some examples include programming and coding support, web site design ideas and SEO practices.

The forum is not meant as a replacement to our Wiki or Customer Support. We highly recommend searching our Wiki before posting on the forum. Also, if you have a question for our Customer Support team, please contact them as you would normally.

We ask that if you have any complaints or questions relating specifically to your account, that you address them to our Customer Support department. Do not post personal account information such as passwords or other sensitive and private information the forum, as this type of information is best kept secret. Also, please be respectful of other users and refrain from defamatory comments or use of coarse language.

We will visit the forum from time to time, and contribute to various topics. We reserve the right to delete any posts which are deemed offensive or against the spirit of the forum. Any spamming or illegal activity will not be tolerated. We also reserve the right to block any user who violates these guidelines.

To get started, we welcome you to sign up at our User Management site. Any account created there will have access to these forums, our Wiki, our Ideas site and commenting permission on our Status Blog.
See more
See less
Redirect problems Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Redirect problems

    There are some unsavory sites linking to non-existent posts on the forum I have hosted here. I would like to return a 404 not found error for these links.

    I have several blogs and forums at other hosts and have used htaccess files to handle redirects before. After hours of tearing my hair out I have not been able to do the most basic permanent redirect. Either nothing happens or I get a 500 server error.

    Has anyone been able to redirect on a requested URL basis? Is it possible with the limitations posed by myhosting??

    I am trying to redirect URLs like:
    ^viewtopic.php?f=45&t=6$ to either my 404.php or to any non-existent file such as goaway.php

    I tried live chat support but they are offline.

    Thanks

  • #2
    Re: Redirect problems

    Does anyone ever read these forums? It seems real quiet here, not much input and myhosting personnel stay away too. :?

    Comment


    • #3
      Re: Redirect problems

      Hello Havuz,

      Sorry for the lack of reply. I haven't had an opportunity to look into this issue yet. I have to admit I'm not overly experienced with administering forums such as phpBB. To confirm, is your forum on phpBB, vBulletin or something else?

      Thanks.

      Comment


      • #4
        Re: Redirect problems

        Hi tima

        The forum uses phpBB and you can visit it by following the link in my signature.

        The problem I am experiencing is independent of phpBB, php, MySQL, html, and similar languages and software. The problem is related to Apache's mod_rewrite module as used in an .htaccess file in a folder root. It concerns a server request - server response relationship and has nothing to do with the resource or file being requested.

        I have requested support via email and have received an initial response (saying "the issue wil be reviewed"). I hope this gets solved quicker than my last support ticket which took over 6 months to get a final response. At least the reply here on the forum took less than a week!

        Comment


        • #5
          Re: Redirect problems

          Hello Havuz,

          I've talked to one of our Developers and one of our SysAdmins about this issue. Yes, you can create a RewriteRule and a 404 redirection in your .htaccess file. But it would seem that the problem is within the phpBB application. When a user browses to a link that does not exist, phpBB is being "helpful" and redirects the user to a nice "HTTP 200 OK" page.

          Perhaps there is a setting, plugin or mod for phpBB which will allow you to bypass this behavior and rely instead on the 404 handling you define in your .htaccess file.

          Comment


          • #6
            Re: Redirect problems

            Hi Tim and thanks for the quick response

            This problem has been awaiting a response from myhosting for almost a week. I was tired of waiting for the support team to respond (previous experience has shown that the wait could be months). I was able to configure the forum software as an interim solution.

            Originally posted by You
            When a user browses to a link that does not exist, phpBB is being "helpful" and redirects the user to a nice "HTTP 200 OK" page.
            If you had taken a look at my forums you would have seen that a user request for a topic that does not exist returns a 302 page moved temporarily and then that in turn gives a 404 page not found. A request for a page that does not exist returns a 404 page not found. Your comment regarding a 200 page found response is not the case on my forums!

            Originally posted by I
            The problem I am experiencing is independent of phpBB, php, MySQL, html, and similar languages and software. The problem is related to Apache's mod_rewrite module as used in an .htaccess file in a folder root. It concerns a server request - server response relationship and has nothing to do with the resource or file being requested.
            :geek: I would like to be able to elicit a 404 response or do a permanent redirect without having to go through software redirect chains linked to dynamic website applications. I want to be able to do redirects according to the server request and this is the help I am asking for. This question is not about phpBB, WordPress, Joomla, Drupal, Magento, Concrete or any other LAMP based dynamic CMS software, it is about the Apache server and Apache server modules installed on the server space I rent from myhosting.

            Originally posted by You
            you can create a RewriteRule and a 404 redirection in your .htaccess file
            The .htaccess support is extremely limited so could you please provide an example (based on the requested URL in my first post) of a redirect I could use. The wiki example doesn't work. I am not able to set Options +Follow SymLinks. I don't know the level of wildcard support available as I have yet to succeed in setting up a redirect. A few examples would allow me to evaluate the scope of the limited use you offer for the mod_rewrite module.

            Thanks

            Comment


            • #7
              Re: Redirect problems

              Hi Havuz,

              This is beyond my abilities, but I've got some feedback for you, hopefully it will help.


              The URLs contain parameters, so Redirect or RedirectMatch will not work.

              It is necessary to use mod_rewrite but matching the parameters (those after
              the '?'). They are not considered part of the URL.


              Code:
              RewriteEngine On
              RewriteCond %{QUERY_STRING} f=45&t=6
              RewriteRule .* - [F]

              Comment

              Working...
              X