mod_rewrite and .htaccess

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dshadowwolf
    Junior Member
    • May 2012
    • 2

    #1

    mod_rewrite and .htaccess

    I have:

    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^/(skins|stylesheets|images|config|awstats|awstatsic ons|captcha)/
    RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index).php
    RewriteCond %{REQUEST_URI} !^/favicon.ico
    RewriteCond %{REQUEST_URI} !^/info.txt
    RewriteCond %{REQUEST_URI} !^/robots.txt
    RewriteRule ^/(.+)$ /index.php?title=$1 [L,QSA]

    in public_html/.htaccess - a bare modification of the same file from an apache install. For some reason it is not working and when I try to make use of the rewrite rules all I get is a 404 from any attempt at a page. Is mod_rewrite not available on cpanel78 or have I missed a requirement somewhere ? (note that the rules are bog-standard for a MediaWiki install)

    I'm puzzled because I see reports in the forums of mod_rewrite working on other cpanelXX hosts.
  • AndrewT
    Administrator
    • Mar 2004
    • 3657

    #2
    mod_rewrite is available and functional on all servers. If you would like us to take a look at your particular configuration we'll need you to go ahead and submit a ticket via our portal.

    Comment

    • Timelord
      Junior Member
      • May 2012
      • 1

      #3
      In my attempt to wrap my head around this, I ended up with the following two links I was mucking about with before growing tired:

      Guide: http://www.mediawiki.org/wiki/Manual:Short_URL/Apache
      Automated Tool: http://shorturls.redwerks.org/

      This may or may not be helpful. It does seem the method you posted has fallen out of favor in the last several years (???). As for your actual question, I still haven't a clue. Of course, I am not overly familiar with any of this and am becoming incoherent. Sleep now.

      Comment

      • dshadowwolf
        Junior Member
        • May 2012
        • 2

        #4
        Updated the .htaccess to match the style they've changed to (using the !-f and !-d bits instead of doing a RewriteCond matching a regex against the pathname - still not working.

        Comment

        • Pedja
          Senior Member
          • Mar 2004
          • 329

          #5
          I guess RewriteLog would help you to resolve problem but I am not sure if you can use that on Dathorn server.

          I found it to be tremendous help on our development local server.

          Comment

          Working...