Results 1 to 8 of 8

Thread: mod_rewrite

  1. #1
    soulbadguy is offline Almost no longer a newbie!
    Join Date
    Jul 2006
    Posts
    4

    Default mod_rewrite

    Do you have mod_rewrite enabled?

  2. #2
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,325

    Default

    Yes. mod_rewrite is enabled in .htaccess.
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | GlowHost's Facebook | Follow us on Twitter | GlowHost on Google+

  3. #3
    soulbadguy is offline Almost no longer a newbie!
    Join Date
    Jul 2006
    Posts
    4

    Default

    hmm, Can you doublecheck? because i can't seem to find any mod_rewrite installed when i used phpinfo to check.

    you can see it here: [removed]
    Last edited by Matt; 07-22-2006 at 02:59 PM.

  4. #4
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,325

    Default

    mod_rewrite is an Apache module not PHP.

    http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

    So it won't show up in your php info.
    Last edited by Matt; 07-22-2006 at 03:01 PM.
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | GlowHost's Facebook | Follow us on Twitter | GlowHost on Google+

  5. #5
    soulbadguy is offline Almost no longer a newbie!
    Join Date
    Jul 2006
    Posts
    4

    Default

    some sites say you can check it by going through the phpinfo:

    I got this from: http://www.workingwith.me.uk/article...ng/mod_rewrite
    For the purpose of this article, I’m going to assume that you don’t have access to view or edit the Apache server httpd.conf file, so the easiest way to check whether the mod_rewrite module is installed will be to look on your phpinfo page. If you’ve not already created one of these for yourself, just copy and paste the following code into an new text file using your favourite text editor, save it as phpinfo.php, and upload it to your server:

    <?php phpinfo(); ?>

    Load that page up in your web browser, and perform a search for “mod_rewrite”. All being well, you’ll find it in the “Apache loaded modules” section of the page. If it isn’t there, you’ll have to contact your hosting company and politely ask them to add it to the Apache configuration.
    and this one at: http://enarion.net/web/apache/htacce...write-on-suse/
    Check if mod_rewrite is installed and integrated in Apache

    You can check this e.g. with the following php file. Create a file in your document root of your webserver (default on SuSE: /srv/www/htdocs) and copy the following content into this file:

    <?php phpinfo(); ?>

    When you view this file with your browser, search for rewrite - you should find one entry. If not - check if you did all steps 1 to 3.
    Last edited by soulbadguy; 07-23-2006 at 08:52 AM.

  6. #6
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,325

    Default

    Its installed. It is news to me (or I have forgotten) that it would appear in php.info unless those sites are referring to people that have Apache loaded as a module and not a CGI. We have our PHP loaded as a CGI....

    Either that or possibly another OS or custom PHP I suppose I'd have to research it some more....

    The second quote is wrong because if you search for "rewrite" you would also come up with url_rewriter.tags

    However, the point being to try adding some rewrite rules to your .htaccess file and you will see that the rewrite engine is enabled.
    Last edited by Matt; 07-23-2006 at 11:25 AM.
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | GlowHost's Facebook | Follow us on Twitter | GlowHost on Google+

  7. #7
    jmarcv's Avatar
    jmarcv is offline Cranky Coder
    Join Date
    Jan 2005
    Posts
    354

    Default

    You will note that in phpinfo, the section on Apache Modules is blank, which is where one would usually see that the rewrite module is loaded. However, It is easily verified as Matt said by actually trying it.

    I just tried this on my site, and it redirects ANY request to the image specified.

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*) http://www.sellersourcebook.com/memb...ch/deleted.jpg

  8. #8
    soulbadguy is offline Almost no longer a newbie!
    Join Date
    Jul 2006
    Posts
    4

    Default

    oh, thanks for telling me about that. I have to say you guys are very fast with replying. thanks again.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16