• I am an absolute beginner and taking things very slowly…
    My host amen.fr assured me that they have the mod_rewrite module before I bought the package. When I created and ran info.php in https://www.petiteanglaise.com/wordpress/info.php it returned the following error message:
    Fatal error: Call to undefined function: infophp() in /home/sites/site165/web/info.php on line 1
    When I created a .htaccess file (I can’t find one anywhere on my server and I have modified the settings on cuteftp to show hidden files as shown in the tutorial on https://www.tamba2.org.uk) in notepad with the information from wordpress and uploaded it, clicking on my post permalink on https://www.petiteanglaise.com returned this error:
    File Not Found
    The requested URL was not found on this server.
    Actually, all the links on my default template are currently returning that message. I moved index.php out of the wordpress folder and changed the file accordingly to show:
    require(‘./wordpress/wp-blog-header.php’);
    ?>
    Can someone tell me what to do? If the easiest way to solve the permalink problem is to add the line index.php into the link then so be it. I can’t handle anything too complicated. But I need to sort out the other URL not found thing before I get into importing from blogger/customising the set up.
    Thanks for your help!
    petite anglaise (currently at https://anglaise.blogspot.com, hopefully not for too much longer…)

Viewing 11 replies - 1 through 11 (of 11 total)
  • Sorry… it should be <?php phpinfo(); ?>
    Have you installed wp ? I see a list of files in that directory.

    Thread Starter 5330

    ok, corrected the info.php file and now I get the following info back:
    Linux paris61.amenworld.com 2.2.16C37_III #1 Sat Apr 12 14:54:32 PDT 2003 i586
    Build Date Aug 17 2004 23:30:32
    Configure Command ‘./configure’ ‘–prefix=/usr’ ‘–with-apxs=/usr/sbin/apxs’ ‘–enable-track-vars’ ‘–disable-debug’ ‘–enable-xml’ ‘–with-gd’ ‘–with-gettext=/usr’ ‘–enable-safe-mode’ ‘–with-config-file-path=/etc/httpd’ ‘–with-exec-dir=/usr/bin’ ‘–with-zlib’ ‘–enable-magic-quotes’ ‘–with-regex=system’ ‘–with-ttf’ ‘–with-db=shared’ ‘–with-gdbm’ ‘–with-mbstring’ ‘–with-mbstr-enc-trans’ ‘–enable-mbregex’ ‘–with-mysql’ ‘–disable-ipv6’ ‘–enable-bcmath’ ‘–enable-calendar’ ‘–enable-memory-limit’ ‘–enable-zend-multibyte’ ‘–enable-track-vars’ ‘–with-libdir=/usr/lib’ ‘–with-gettext’ ‘–with-imap=/usr/src/redhat/SOURCES/imap-2004/c-client’ ‘–with-jpeg-dir=/usr/local/lib’ ‘–with-png-dir=/usr/local/’ ‘–enable-ftp’ ‘–with-pgsql=shared’ ‘–with-ldap’
    Server API Apache
    Virtual Directory Support disabled
    Configuration File (php.ini) Path /etc/httpd/php.ini
    PHP API 20020918
    PHP Extension 20020429
    Zend Extension 20021010
    Debug Build no
    Thread Safety disabled
    Registered PHP Streams php, http, ftp, compress.zlib
    I have installed wordpress and so far just put in one test post and configured my options.
    I am unsure about which files I am supposed to CHMOD and at what stage in the proceedings. Do I just CHMOD 666 individual files as and when I want to change them? Or are there any files I should do this to immediately?
    And why does every link come back :
    File Not Found
    The requested URL was not found on this server.
    ???? It’s scaring the hell out of me! Help!

    mod_rewrite is there.
    CHMOD ? index.php. the css file, wp-comments.php for now and others as needed.
    Have you created a permalink structure and got wp to make the .htaccess rules ?
    Did you correctly follow this ?
    https://www.ads-software.com/docs/installation/different-address/
    And it’s not scary – All will be well soon ??

    Thread Starter 5330

    ok here goes.
    I created a file in notepad called .htaccess (but it has a .txt at the end that I don’t seem to be able to remove) and copied this to https://www.petiteanglaise.com/web where the index.php file also lives. Amen says this file needs CHMOD 644 which it does.
    The text it generated by WordPress for my links is below:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^archives/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/wp-feed.php?category_name=$1&feed=$2 [QSA]
    RewriteRule ^archives/category/?(.*) /index.php?category_name=$1 [QSA]
    RewriteRule ^archives/author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/wp-feed.php?author_name=$1&feed=$2 [QSA]
    RewriteRule ^archives/author/?(.*) /index.php?author_name=$1 [QSA]
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?/?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/wp-feed.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [QSA]
    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/trackback/?$ /wordpress/wp-trackback.php?year=$1&monthnum=$2&day=$3&name=$4 [QSA]
    RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /wordpress/wp-feed.php?feed=$1 [QSA]
    RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /wordpress/wp-feed.php?feed=$1&withcomments=1 [QSA]
    Even with hidden files enabled in cute ftp I couldn’t find a .htaccess file already existing in my directories. The Amen website does say that the authentication module PAM is used on the Apache server and that a line should be added:
    AuthPAM_Enabled off dans votre fichier.htaccess
    I have just done this.
    As far as the different files installation is concerned, I followed the steps and checked them about 10 times. Index.php and .htaccess are just in https://www.petiteanglaise.com/web. The rest of the Worpdress files are in https://www.petiteanglaise.com/web/wordpress.
    I changed the index.php file to include /wordpress/ in the address as follows:
    require(‘./wordpress/wp-blog-header.php’);
    ?>
    The template editor in WordPress can’t find index.php. It doesn’t find it unless it is located in the WordPress folder. What is going on!?
    Thanks for holding my hand.
    If you want all my access codes to check it out yourself because I’m clearly retarded, do let me know.

    Okay..
    htaccess will have the .txt extension when in your computer because that’s the way Windows works. Once it is on the server, use your ftp program to rename it to .htaccess
    If you install into 2 directories like you have, then the template editor does not work for those files that have been moved – in this case, it’s index.php
    You can change that by downloading the file ‘templates.php’, finding the list of files that it lists for editing, and changing the path for index.php – if you do download it, edit it in Notepad or WordPad.
    And no, you are not stupid at all ??

    Thread Starter 5330

    *very cautiously*
    I think that’s done it.
    For now I’ll say goodnight as it’s 1am here.
    Sincerest thanks for that. I feel like I’m finally getting somwhere.

    Yup ??
    Looks good !

    Your stylesheet is probably a relative path, like “styles.css”
    Therefore it’s looking for it in “/archives/%year%/%monthnum%/%day%/%postname%/styles.css” instead of “/styles.css” Make it an absolute path and you should be set! ??

    Yup! Thanks, Brak!
    JP

    … and BTW, have any idea on how to make the template work in a situation where the index is not in the wp folder?
    JP

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘installation: mod_rewrite and .htaccess’ is closed to new replies.