Need HELP : hosting doesn't support mod_rewrite.

Discussion in 'Programming' started by ishiro, Jul 6, 2008.

  1. #1
    Hi, my hosting (free.fr) doesn't support mod_rewrite that i need for my online manga viewer to work correctly, with the .htaccess file i have a 500 error and when a delete the .htaccess file the home page appears but the script doesn't work correctly.
    Can someone help me?
    Pm if interested.

    I'll pay paypal.
     
    ishiro, Jul 6, 2008 IP
  2. ryandanielt

    ryandanielt Well-Known Member

    Messages:
    1,797
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    185
    As Seller:
    100% - 2
    As Buyer:
    100% - 0
    #2
    Modify and add this to your .htaccess in the main directory of your site

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^yoursite.com
    RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L]
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
    RewriteRule ^index\.html$ http://www.yoursite.com/ [R=301,L]
     
    ryandanielt, Jul 6, 2008 IP
  3. ishiro

    ishiro Active Member

    Messages:
    661
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    60
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    Here is my .htacces

    Options +FollowSymlinks

    RewriteEngine on

    RewriteRule ^mangas/([^/]+)/([^/]+)/$ - [F,L]
    RewriteRule ^mangas/([^/]+)/$ - [F,L]
    RewriteRule ^mangas(/?)$ - [F,L]

    RewriteRule ^([^/.]+)/([^/.]+)/([0-9]+)(/?)$ index.php?manga=$1&chapter=$2&page=$3 [L]
    RewriteRule ^([^/.]+)/([^/.]+)(/?)$ index.php?manga=$1&chapter=$2 [L]
    RewriteRule ^([^/.]+)(/?)$ index.php?manga=$1 [L]


    The mod_rewrite isn't supported by my hosting.
     
    ishiro, Jul 6, 2008 IP
  4. aminemx

    aminemx Peon

    Messages:
    78
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    you can't use .htaccess if apache extension "mod_rewrite" not available.
     
    aminemx, Jul 6, 2008 IP
  5. DMComics

    DMComics Peon

    Messages:
    9
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    That's what I said, your only option is to find another hosting service, or ask the hoster to turn on mod rewrite (I doubt they will though)
     
    DMComics, Jul 6, 2008 IP
  6. ishiro

    ishiro Active Member

    Messages:
    661
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    60
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    ishiro, Jul 6, 2008 IP
  7. Randombase

    Randombase Peon

    Messages:
    224
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #7
    Yes, it's possible to create your own "mod_rewrite". By ussing something like this:

    .htaccess:
    ErrorDocument 404 /rewrite.php
    Code (markup):
    And in rewrite.php:
    
    <?php
    print $_SERVER['REQUEST_URI'];
    ?>
    
    Code (markup):
    This shows what URL is requested, so now you can parse it. I can do this for you, of course ;)
     
    Randombase, Jul 6, 2008 IP
  8. ishiro

    ishiro Active Member

    Messages:
    661
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    60
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #8
    Sent you a pm.
    Thanks
     
    ishiro, Jul 6, 2008 IP
  9. ishiro

    ishiro Active Member

    Messages:
    661
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    60
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #9
    Hi guys, i'm still looking for a solution.
     
    ishiro, Jul 7, 2008 IP
  10. Randombase

    Randombase Peon

    Messages:
    224
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #10
    I've sent the files back, think I solved the issue.
     
    Randombase, Jul 7, 2008 IP
  11. ishiro

    ishiro Active Member

    Messages:
    661
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    60
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #11
    Thanks Randombase, the problem is solved.
    Payment sent.
     
    ishiro, Jul 7, 2008 IP