How Can I get mod_rewrite to run on 10.6.4?

Hi there,
I've carried over a local wordpress install for some debug/dev purposes on to my local comp and encountered a few issues in getting permalink/mod_rewrite functions to run cleanly.
I've noticed there's a number of posts in this forum about this but none of them appear to give a solution so far.
My setup is as follows:
/private/etc/apache2/httpd.conf
/*Module section*/
*LoadModule rewrite_module libexec/apache2/mod_rewrite.so*
/* didn't know we needed this but read it on a blog post so gave it a shot*/
*AccessFilename .htaccess*
/* in <Directory> sections */
*Options FollowSymLinks*
*AllowOverride All*
/* in <Directory "/Library/WebServer/Documents"> sections */
*Options Indexes FollowSymLinks MultiViews*
*AllowOverride All*
I realise that the AllowOverride All at the <Directory> and <Directory "parent site"> are potentially overkill given that I only want to run the mod_rewrite for a particular user's directory. This then brings me to the specific users conf file (verbose here):
/Private/etc/Apache2/users/[username].conf
*<Directory "/Users/[username]/Sites">*
*Options Indexes MultiViews FollowSymLinks*
*AllowOverride All*
*Order allow,deny*
*Allow from all*
</Directory>
I then created a .htaccess in the user's site directory to call-up the mod_rewrite:
*<IfModule mod_rewrite.c>*
*Options +FollowSymlinks*
*RewriteEngine On*
*RewriteBase /~tariqscherer/*
*RewriteRule ^index\.php$ - [L]*
*RewriteCond %{REQUEST_FILENAME} !-f*
*RewriteCond %{REQUEST_FILENAME} !-d*
*RewriteRule . /~tariqscherer/index.php [L]*
</IfModule>
This code above was the rewrite recommended by WordPress, so I assumed that it would work. However, I do not get any rewrite action occurring whatsoever.
The Apache error log (/var/log/apache2/error_log) gives me a File does not exist result:
Mon Sep 06 16:03:55 2010 error client 192.168.1.18 File does not exist: /Users/[username]/Sites/about, referer: http://dasein-im-welt/~*[username]*/
This error links back to the access log's GET 404 error (/var/log/apache2/access_log):
192.168.1.18 06/Sep/2010:16:03:55 0200 "GET /~[username]/about/ HTTP/1.1" 404 218
I've then tried to debug this process a little bit by starting a rewrite log over in the httpd.conf file with the following syntax:
*RewriteLog /var/log/apache2/rewrite_log*
*RewriteLogLevel 3*
And then retrying hoping to trace some of the errors. Much to my surprise the log remains empty so I can only assume that the rewrite is simply not operating at all.
I then thought I should try a simple rewrite test to ensure that the error wasn't from the wordpress .htaccess cod: and put through the following in my .htaccess file:
*<IfModule mod_rewrite.c>*
*Options +FollowSymlinks*
*RewriteEngine On*
*#RewriteBase /~tariqscherer/*
*RewriteRule ^alice\.html$ index.php*
*#RewriteRule ^index\.php$ - [L]*
*#RewriteCond %{REQUEST_FILENAME} !-f*
*#RewriteCond %{REQUEST_FILENAME} !-d*
*#RewriteRule . /~tariqscherer/index.php [L]*
</IfModule>
I expected this rewrite to give me a rewrite over to index.php for an address entry of alice.html. However, no difference in terms of the end result - browser gives me a fail and logs are as follows:
Access_Log:
192.168.1.18 06/Sep/2010:16:19:15 0200 "GET /~[username]/alice.html HTTP/1.1" 404 222
Error_Log:
Mon Sep 06 16:19:15 2010 error client 192.168.1.18 File does not exist: /Users/[username]/Sites/alice.html
Oh and the rewrite_log, though created, remains blank.
I can therefore only assume that the mod_rewrite is simply not being called at any point and not rewriting the http GET requests in any form whatsoever to correct directory.
My Question therefore is.
Has anybody managed to get the mod_rewrite running under Mac OS X 10.6.4? Taking into account that:
1. .htaccess is set by the AccessFile in httpd.conf
2. AllowOverride All is set in the httpd.conf root <Directory> and <Directory "location"> sections, as well as in the [username].conf file.
3. FollowSymLinks is also set under all options
4. +FollowSymLinks is also set as an added precautionary measure in the .htaccess file
I would be greatful for any help on this whatsoever.
Tariq Scherer
PS: the username used on my comp was substituted by [username] above, I hope this can help for anybody else to just substitute the entries out on their own local config or to provide a comparison entry.

HI All,
This isn't a solution per se, but in order to overcome the .htaccess rewrite calls limitations I had to:
1. Rebuild Apache (up to 2.2.16) and explicitly specifying a rebuild with enable-rewrite
2. Rebuild PHP in order to get a native module going.
This solution works, I event went as far as just carrying over the exact same config files over to the new Apache install. There seems to be a block in the native Apache binary build that prevents usage of .htaccess (security reasons I presume?).
The catch, however, is you will get pid locks over the two installs unless you explicit a separate lock file and you won't be able to call up the new Apache install from the preference panel in OS X fashion - need to be a bit patient with the terminal is all.
For the apache install, you have to make sure you set a prefix location that suits you (and remember the put that prefix then over for the module load in your config as it won't be able to access your old .so modules):
sudo ./configure --prefix=/usr/local/apache2 --enable-rewrite
Also note, that when recompiling php with mysql support, a few config options need to be set to disable the cgi build options (not sure why, but it does the trick). The command for the PHP rebuild is as follows:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --disable-cgi
Kind Regards,
Tariq Scherer
http://twentyfoursomething.wordpress.com/

Similar Messages

  • How can I get Firefox to run KIOSK mode on Android phone? I am trying to use rKiosk but have not been successfull. I'm running 10.0.3 on the phone.

    How can I get Firefox to run KIOSK mode on Android phone? I am trying to use rKiosk but have not been successfull. I'm running 10.0.3 on the phone.

    Found an app to lock down the phone. SUREFOX!!!

  • IPod Nano 2nd Generation is requesting 4 digit code. I have never set a lock code. What is this and how can I get my Nano running again?

    iPod Nano 2nd Generation is requesting 4 digit code. I have never set a lock code. What is this and how can I get my Nano running again?

    There is no other way to bypass the combintation lock other than to connect the nano to iTunes and restore it to factory settings, erasing all content and settings from the iPod.
    B-rock

  • How can i get VMware to run to lion?

    vmware will not open on lion! how can i get the to run?

    You contact the VMware vendor and get their support.

  • Exchange 2013 remote session running as PowerShell version 2.0. How can I get it to run version 3.0?

    I'm trying to use the newer Powershell 3.0 features, particularly the ability to disconnect/reconnect a remote session, for our Exchange 2013 administration tools.  I have 3.0 on my workstation, and am connecting to a remote session on an Exchange 2013
    server (on Server 2012).   Even LOCALLY on the Exchange 2013 server Exchange Management Shell I get the same behavior:
    Exchange Command Shell on an Exchange 2013 server (running Windows Server 2012)
    [PS] >$PSVersionTable
    Name                           Value
    PSVersion                      3.0
    WSManStackVersion              3.0
    SerializationVersion           1.1.0.1
    CLRVersion                     4.0.30319.19117
    BuildVersion                   6.2.9200.16628
    PSCompatibleVersions           {1.0, 2.0, 3.0}
    PSRemotingProtocolVersion      2.2
    [PS] C:\Windows\system32>Get-PSSession
     Id Name            ComputerName    State         ConfigurationName
      1 Session1        mercmbx35r.n... Opened        Microsoft.Exchange
    [PS] C:\Windows\system32>$session = Get-PSSession
    [PS] C:\Windows\system32>$session.ApplicationPrivateData.PSVersionTable
    Name                           Value
    PSVersion                      2.0
    PSCompatibleVersions           {1.0, 2.0, 3.0}
    PSRemotingProtocolVersion      2.2
    BuildVersion                   6.2.9200.16628
    CLRVersion                     4.0.30319.19117
    WSManStackVersion              3.0
    SerializationVersion           1.1.0.1
    How/where can I force the Exchange session to run version 3.0?
    Thanks in advance,
    Rick Tatem

    I still can't get it to work that way. I changed my cfexecute to:
    <cfexecute name="C:\windows\system32\cmd.exe" arguments="/c C:\Inetpub\wwwroot\captcha\#cmd_filename#" outputFile="C:\testoutput.txt" timeout = "90"></cfexecute>
    And I changed my bat file to have:
    <cfsavecontent variable="cmd_content">
    cd\
    TSC.exe /s "#newString#" C:\Inetpub\wwwroot\captcha\#FileName# Mary (for Telephone)
    </cfsavecontent>
    The output file is showing:
    C:\ColdFusion9\runtime\bin>cd\
    C:\>TSC.exe /s "3.....P.....4.....Z.....8.....U.....7.....X....." C:\Inetpub\wwwroot\captcha\3P4Z8U7X-105724.wav Mary (for Telephone)
    I still can't get it to run the exe. I have watched the process list while running this and the exe doesn't show up. I tried cfexecute on the exe directly before trying the bat method, with hard coded arguments, and it still didn't work. I am so lost right now this makes no sense to me.

  • How can I get Snow Leopard running

    I have a 13'' Macbook that was running perfectly fine - I haven't had one issue since I bought it.  I bought the iphone 5 and needed to upgrade my itunes to version 7.  I was running Leopard 10.5.8 and needed to upgrade my OS to Snow Leopard in order to get itunes.  I ordered the software (10.6.3) and installed it on my computer.  The installation said it was successful.  I restarted my computer but I received a blinking folder with a question mark on it so I googled some solutions to see what could have gone wrong because the installation was successful.
    I have tried holding c, option, resetting the pram, disconnecting my battery and pressing the power button for 5 seconds, erasing my HD drive, restoring the HD drive with a Time Machine Backup, and everything else I was told to do but I can not get my computer up and running.  If I restart it, I keep receiving the blinking folder with the question mark.  I'm not sure how it can not recognize a OS when I go to Startup Disk, it lists my OS being 10.6.3.  When I boot the computer from the dvd, it just continues to ask me to install the software each time and I'm going in circles.
    Can someone please tell me what to do?  It seems that Apple doesn't know what to do, my hard drive was repaired (it wasn't broken), and the installation is going through sucessfully, why can't I get my computer running?
    HELP!  I'm a photographer and graphic designer and can't afford to be out of commission.  All I did was install a software, this shouldn't be this difficult.
    Thanks!

    Does your MacBook meet the minimum requirements for Snow Leopard?

  • How Can I get My iMac Running again when its stuck in the Loading boot up Screen?

    My 2010 21.5 Imac wont  stop loading, The wheel just keeps spinning and it doesn't even boot in safe mode. the only thing i can do is get into single user mode. My Mac doesn't respond to command + r. I am able to pull up a disk to boot from but it doesn't show a recovery disk, only "Macintosh HD", when i click it I'm back at the apple logo screen with spinning wheel.At this point i want to do one thing and that is factory reset the computer. a fresh install, delete everything, NO BACK UPS. I don't have the install CD (This Computer had a previous owner). If i were to buy a copy of the OS X from the apple store (I believe my computer was running 10.6.8, Im not 100%sure and i dont now how to find out at this point) would i be able to even put the CD in the disc drive? would it read the CD even though its stuck in the boot up(loading) screen? How would i get it out if the Drive doesn't read the disk? Do I have Other options? Thanks guys!

    You are using Snow Leopard. There is no COMMAND-R for a startup. That's for Lion or later.
    Call Apple and purchase replacement discs for your model. You cannot use the retail version of Snow Leopard on your model. You have no other options unless you have the original discs that came with the computer. When you get the discs:
    Clean Install of Snow Leopard
    Be sure to make a backup first because the following procedure will erase
    the drive and everything on it.
         1. Boot the computer using the Snow Leopard Installer Disc or the Disc 1 that came
             with your computer.  Insert the disc into the optical drive and restart the computer.
             After the chime press and hold down the  "C" key.  Release the key when you see
             a small spinning gear appear below the dark gray Apple logo.
         2. After the installer loads select your language and click on the Continue
             button. When the menu bar appears select Disk Utility from the Utilities menu.
             After DU loads select the hard drive entry from the left side list (mfgr.'s ID and drive
             size.)  Click on the Partition tab in the DU main window.  Set the number of
             partitions to one (1) from the Partitions drop down menu, click on Options button
             and select GUID, click on OK, then set the format type to MacOS Extended
             (Journaled, if supported), then click on the Apply button.
         3. When the formatting has completed quit DU and return to the installer.  Proceed
             with the OS X installation and follow the directions included with the installer.
         4. When the installation has completed your computer will Restart into the Setup
             Assistant. Be sure you configure your initial admin account with the exact same
             username and password that you used on your old drive. After you finish Setup
             Assistant will complete the installation after which you will be running a fresh
             install of OS X.  You can now begin the update process by opening Software
             Update and installing all recommended updates to bring your installation current.
    Download and install Mac OS X 10.6.8 Update Combo v1.1.

  • How can I get Automator to run every hour

    Hello,
    I want to run a Unix Shell executable every hour (measuring network bandwidth), but automator only seems to be able to go down to once  a day. Is there anyway of getting automator to run the executable every hour?

    If you already have the shell script then skip Automator and use launchd(8)  to run the script on what ever schedule you'd like.
    There are many good tutorials and examples of using launchd  see Creating Launch Daemons and Agents - Apple Developer and Mac OS X launchd examples  for a start.
    Also see http://launched.zerowidth.com/ as one way to automate making the plist file.
    regards

  • How can I get Firefox to run on a network with multiple users logging on with the same user name and password?

    I am trying to get Firefox running on a large network where I have multiple users that log on with the same user name and password. The problem is that when another user logs on to another computer the message comes up that their is already an instance of firefox running on that computer even though there really isn't. Only one instance can be run on the network at one time. I believe it is because firefox stores a shared profile as it thinks it is actually the same user even though it is being run on another computer. I repeat that each user that logs on uses the same user name and password but on different computers.

    I am trying to get Firefox running on a large network where I have multiple users that log on with the same user name and password. The problem is that when another user logs on to another computer the message comes up that their is already an instance of firefox running on that computer even though there really isn't. Only one instance can be run on the network at one time. I believe it is because firefox stores a shared profile as it thinks it is actually the same user even though it is being run on another computer. I repeat that each user that logs on uses the same user name and password but on different computers.

  • Windows Vista can't find Firefox.exe on my hard drive, but it is there. How can I get Firefox to run?

    Windows Vista can't find the Firefox.exe program on my machine but it is right there in program files. Windows won't run it. After clicking on the short cut icon and after a delay I get an error message saying that windows can't find it. What can I do to fix this problem?

    Hey merodi,
    I dont fully understand your problem here,
    1. Did your computer shut down or 'die' or did you save and then you cant find it?
    2. Have you tried looking in spotlight (little magnifying glass up the corner)
    3. Have you tried opening the program again? In word and pages, if the program exited forcefully, opening it again will restore the document.

  • How can i get my Imac, running OSX 10.6.8 with a 2Ghz Intel Core 2 Duo, how can i get Final Cut Pro 4 and DVD studio pro 2 to run on it?

    I just bought an IMAC running OSX 10.6.8 (not sure what flavor that is). The processor is 2Ghz Intel Core 2 Duo (Late 2006). When i run Final Cut Pro 4 on it I get the following error.
                        "Configuration error
                           This software requires certain hardware or software which is missing
                                    * AGP graphics Card"
    If Final Cut Pro 4 doesn't run on my system, what version of Final Cut can I run on this as I am a filmmaker and really am comfortable with Final Cut Pro.
    On the same note I also have DVD studio Pro 2 and that just quits without any message.
    Hope any of you can be some help.
    Thank you,
    Doug

    This is my first mac in a long time so i'm not sure about what this mac is as i didn't buy this from apple (ala Amazon). I'm a tad confused about the Intel/PowerPC thing. I do know the software version for sure, but the Intel/PowerPC is very confusing. I just need to find someone who would know about this question. It doesn't say G5 on this computer. Thats my biggest confusion. Help Me...

  • How can I get FF to run install apps?

    When I click on a download link for a upgrade app (.exe file) in IE, I am given the option of running or saving the file. I usually just run it.
    In FF, I am not given the "Run" option, so I have to save it, then navigate to it, run it, and remember to delete it.
    Is there some option I can set to get it to allow me to just run the program and not have to save it?

    I'm sure that IE also downloads and saves the file somewhere (probably in the cache or in %temp%), but you probably won't notice it.
    You need to remember downloads to be able to use the above posted steps.
    To see all the History and Cookie settings, select:
    * Tools > Options > Privacy > History: Firefox will: "Use custom settings for history" > download history
    *https://support.mozilla.org/kb/Downloads+window

  • CHUD enabler Leopard - How can I get it to run automatically?

    Hello everyone.
    My question is whether I can get CHUD Enabler leopard to run automatically at startup under 10.5.8. Using login items, I have set it to open automatically, but it doesn't actually run as it does under 10.4.11 (script appears at desktop, but I have to hit the "run" button). Thanks.

    Save it as an application, turning off the option to show the startup screen.
    (69490)

  • How can I get sound when running different operating systems in VirtualBox?

    I am running VirtualBox in Windows XP, and have been running OpenSolaris, Kubuntu, OpenSuse 11.1, Milax and Windows 7, but I am not getting any sound in any of them. I have no problems with them running, and even ran Windows live in windows 7 without any problems.
    I would be grateful if anyone can help me out so that I can get sound, and therefore run them as they are meant to be ran in VirtualBox! I have had a small problem with some video files not running in Linux and OpenSolaris, but I suspect that could be solved with Flash player.
    Please someone get back to me and help me with the sound problem as soon as possible,
    Thanks
    John

    A Windows XP host OS for VirtualBox is not a supported setup for VDI 3.0 (it wouldn't even install). I have never seen your problem with one of my other VB installations. I suggest that you repost your question in a VirtualBox forum: http://forums.virtualbox.org/

  • How can I get iPhoto to run after power outage?

    iPhoto will launch but does not show anything and I have to force quit.  I have read info online regarding same, but I'm hesitant to try some suggestions because I have no back up. 
    Also... cannot find com.apple.iphoto.iphoto.plist on my computer if that's useful.
    Please help!

    Here's the same thing that Larry suggested but stated a little differently (I hope):  make a temporary, backup copy (select the library and type Command+D) and  apply the two fixes below in order as needed:
    Fix #1
    Double click on  iPhoto in the dock with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start with Option #1, followed by #3 and then #4 as needed.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    Hope you can follow that.
    OT

Maybe you are looking for