Results 1 to 3 of 3

Thread: mod rewrite setting Xampp?

  1. #1
    Join Date
    Jun 2004
    Location
    Central Mexico
    Posts
    327

    Default mod rewrite setting Xampp?

    Just did a fresh install of 2.3.4 and selected Search Engine friendly urls in the configuration.

    I am using Xampp for Windows 1.5.1 on a localhost install.

    I renamed the .htaccess-or file with 2.3.4 to .htaccess and made no changes in it.
    Things look normal as I check out the various default links..including search...but, when I click on the sample "White House" link that produces the following URL --http://localhost/ORRealEstate/listing-Example+Listing-1.html --I get the browser error in Firefox "Object not found!".

    Before all of this I modified the httpd.conf file in Xampp according to these instructions at http://wiki.cakephp.org/docs:mod_rewrite to activate the mod rewrite module and activated the LoadModule cach_module, too.

    I followed these instructions:

    Open this file “xampp\apache\conf\httpd.conf”In your text editor, do a search or Ctrl+F, and search for “mod_rewrite”It should take you to the correct line, 118 for me.There is a “#” in the beginning of that line. Remove it.Now cut this line “LoadModule rewrite_module modules/mod_rewrite.so”. Then search for “LoadModule cache_module”Paste the line you cut right above this cache line.Now do a search for “AllowOverride None”. There will be two results. You’re only going to change one. (I only found one)Change the result on line 223 (mine was on line 188) (or the one after #comments), to “AllowOverride All” Save the file, Close it, and Restart XAMPP by clicking “xampp_restart.exe” in your XAMPP folder.

    Such dynamic links as this work fine--http://localhost/ORRealEstate/index.php?action=search_step_2&pclass[]=2---

    Restarting Apache shows the rewrite module is running, the .htaccess file is sitting in the root on my localhost. And I am testing this with PHP Version 4.4.1-pl1.

    Any other Xampp users with Windows test boxes figure this out successfully for yourselves? These are the loaded modules in the php info file:

    core mod_win32 mpm_winnt http_core mod_so mod_actions mod_alias mod_asis mod_auth_basic mod_authn_default mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_rewrite mod_cache mod_cgi mod_dav mod_dav_fs mod_dir mod_env mod_include mod_info mod_isapi util_ldap mod_log_config mod_mime mod_negotiation mod_setenvif mod_status mod_ssl mod_autoindex_color sapi_apache2

    Thanks for any thoughtful replies!

    And, in case somebody wonders, this is my .htaccess file:::::

    # SEARCH ENGINE FRIENDLY URLS FOR OR 2.0
    <IfModule mod_php4.c>
    php_value session.use_trans_sid 0
    </IfModule>

    RewriteEngine On

    Rewriterule ^index.html index.php
    RewriteRule listing-([^-]*)-([0-9]*).html index.php?action=listingview&listingID=$2 [L]
    RewriteRule page-([^-]*)-([0-9]*).html index.php?action=page_display&PageID=$2 [L]
    RewriteRule search.html index.php?action=searchpage [L]
    RewriteRule searchresults.html index.php?action=searchresults [L]
    RewriteRule agents.html index.php?action=view_users [L]
    RewriteRule view_favorites.html index.php?action=view_favorites [L]
    RewriteRule calculator.html index.php?action=calculator&popup=yes [L]
    RewriteRule saved_searches.html index.php?action=view_saved_searches [L]
    RewriteRule listing_image_([0-9]*).html index.php?action=view_listing_image&image_id=$1 [L]
    RewriteRule logout.html index.php?action=logout [L]
    RewriteRule member_signup.html index.php?action=signup&type=member [L]
    RewriteRule agent_signup.html index.php?action=signup&type=agent [L]
    RewriteRule member_login.html index.php?action=member_login [L]
    RewriteRule edit_profile_([0-9]*).html index.php?action=edit_profile&user_id=$1 [L]

  2. #2
    Join Date
    Jun 2004
    Location
    Central Mexico
    Posts
    327

    Default Re: mod rewrite setting Xampp?

    okay...this appears to have baffled the usual experts....

  3. #3
    Join Date
    Jun 2004
    Location
    Central Mexico
    Posts
    327

    Default Re: mod rewrite setting Xampp SOLVED

    OKAY....solved.

    When using Xampp server I had to make sure of these changes:

    About line 220 in the xampp\apache\conf\httpd.conf file it has to read like this:

    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    # Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all


    And in the Open Realty .htaccess file it has to have the RewriteBase parameter after it specifies the RewriteEngine On:

    RewriteEngine On
    RewriteBase /ORealEstate

    So, with Xampp server for Windows XP it is apparently not enough to use the existing Open Realty .htaccess file until the "RewriteBase /actualfilename" parameter is inserted on what would be line 7

    So, the first 9 lines of the Open Realty .htaccess file (the renamed .htaccess-or file) in my working example look like this for an installation that has this URL in the browser: "http://localhost/ORealEstate"----

    # SEARCH ENGINE FRIENDLY URLS FOR OR 2.0
    <IfModule mod_php4.c>
    php_value session.use_trans_sid 0
    </IfModule>

    RewriteEngine On
    RewriteBase /ORealEstate
    Rewriterule ^index.html index.php
    RewriteRule listing-([^-]*)-([0-9]*).html index.php?action=listingview&listingID=$2 [L]

    and all the other Rewrite rules follow....

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
  •