Welcome Guest, Not a member yet? Register   Sign In
XAMPP
#1

[eluser]nZac[/eluser]
I am ready to kill something. Does anyone know of a .htaccess file that plays well with XAMPP for Mac? It is a clean installation, and I can't seem to get anything going! I want to remove index.php from the URL. I have tried all of the suggestions I could find, but nothing seems to work! At this point, I am willing to dump XAMPP, I just left MAMP because of this problem, and really don't know where to go next. I would be willing to put am independent install of apache, mysql and php if that is what it takes, just point me in the right direction.
#2

[eluser]vitoco[/eluser]
i'll just post mine...don't know if it works on your machine...
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Saludos
#3

[eluser]skunkbad[/eluser]
I find XAMPP to be quite the pain in the rear end (well, at least to start out with). Are you using vhosts? Using vhosts was the answer to my XAMPP issues, which included problems with .htaccess.
#4

[eluser]nZac[/eluser]
That worked great vitoco. Thanks a lot!

skunkbad, I am thinking that I should set up a virtual host running linux and set it up like an actual web server. However I have never done that and am new to the Mac OS. What do you recomend? Any good tutorials? Favorite products (i.e. vmware)?
#5

[eluser]skunkbad[/eluser]
[quote author="nZac" date="1275381344"]That worked great vitoco. Thanks a lot!

skunkbad, I am thinking that I should set up a virtual host running linux and set it up like an actual web server. However I have never done that and am new to the Mac OS. What do you recomend? Any good tutorials? Favorite products (i.e. vmware)?[/quote]

If you have an old computer that you can wipe clean and turn into a server, I always loved my experience setting up a Ubuntu Server Edition web server. And while I might seem stupid, I think I actually learned a lot. That said, I'd really rather not have to deal with servers, at least on a professional level. I guess if that was my job I'd be more enthusiastic about tinkering with them, but I'd rather just design/develop.

vhosts isn't that hard to set up on XAMPP. It might be if you do it right, but I just got it working... with SSL by the way, which I love. XAMPP is really cool in that respect. I was a long time wampserver user, but they don't have a reasonable way to set up SSL. Yes, I did manage to get SSL working on wampserver as well, but XAMPP is built in. I sure with XAMPP had the ease of general use that wampserver has though. Wampserver is almost all GUI, which is great for me.

If you wanna see my vhosts file, it looks like this right now:
Code:
#
# Virtual Hosts
#

NameVirtualHost *:80
NameVirtualHost *:443
SSLStrictSNIVHostCheck off

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "E:\xampp\htdocs\localhost"
    <Directory "E:\xampp\htdocs\localhost">
        # this only needs to be here for the error pages
        # and the fact that the site doesn't have an .htaccess
        RewriteEngine On
    </Directory>
</VirtualHost>
#<VirtualHost *:443>
#    DocumentRoot "E:\xampp\htdocs\localhost"
#    ServerName localhost
#    SSLEngine on
#    SSLCertificateFile conf/ssl.crt/server.crt
#    SSLCertificateKeyFile conf/ssl.key/server.key
#</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.codeigniter
    DocumentRoot "E:\xampp\htdocs\codeigniter"
</VirtualHost>
<VirtualHost *:443>
    DocumentRoot "E:\xampp\htdocs\codeigniter"
    ServerName localhost.codeigniter
    SSLEngine on
    SSLCertificateFile conf/ssl.crt/server.crt
    SSLCertificateKeyFile conf/ssl.key/server.key
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.community-cart
    DocumentRoot "E:\xampp\htdocs\community-cart"
</VirtualHost>
<VirtualHost *:443>
    DocumentRoot "E:\xampp\htdocs\community-cart"
    ServerName localhost.community-cart
    SSLEngine on
    SSLCertificateFile conf/ssl.crt/server.crt
    SSLCertificateKeyFile conf/ssl.key/server.key
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.eatavocados
    DocumentRoot "E:\xampp\htdocs\eatavocados"
    <Directory "E:\xampp\htdocs\eatavocados">
        # this only needs to be here for the error pages
        # and the fact that the site doesn't have an .htaccess
        RewriteEngine On
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.fastening-systems
    DocumentRoot "E:\xampp\htdocs\fastening-systems"
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.hemetpoolcare
    DocumentRoot "E:\xampp\htdocs\hemetpoolcare"
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.iamsentme
    DocumentRoot "E:\xampp\htdocs\iamsentme"
    <Directory "E:\xampp\htdocs\iamsentme">
        # this only needs to be here for the error pages
        # and the fact that the site doesn't have an .htaccess
        RewriteEngine On
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.imagedevelopmentinc
    DocumentRoot "E:\xampp\htdocs\imagedevelopmentinc"
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.janome
    DocumentRoot "E:\xampp\htdocs\janome"
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.newBWD
    DocumentRoot "E:\xampp\htdocs\newBWD"
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.newhopecares4you
    DocumentRoot "E:\xampp\htdocs\newhopecares4you"
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.ramseys-auto-detailing
    DocumentRoot "E:\xampp\htdocs\ramseys-auto-detailing"
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.ranchointeriordesign
    DocumentRoot "E:\xampp\htdocs\ranchointeriordesign"
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.rickstier
    DocumentRoot "E:\xampp\htdocs\rickstier"
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.script-library
    DocumentRoot "E:\xampp\htdocs\script-library"
    CustomLog "E:\xampp\apache\logs\access.log" combined
    ErrorLog "E:\xampp\apache\logs\error.log"
    <Directory "E:\xampp\htdocs\script-library">
        Options Indexes FollowSymLinks Includes ExecCGI
        RewriteEngine On
        AllowOverride All
    </Directory>
</VirtualHost>
<VirtualHost *:443>
    DocumentRoot "E:\xampp\htdocs\script-library"
    ServerName localhost.script-library
    SSLEngine on
    SSLCertificateFile conf/ssl.crt/server.crt
    SSLCertificateKeyFile conf/ssl.key/server.key
    CustomLog "E:\xampp\apache\logs\access.log" combined
    ErrorLog "E:\xampp\apache\logs\error.log"
    <Directory "E:\xampp\htdocs\script-library">
        Options Indexes FollowSymLinks Includes ExecCGI
        RewriteEngine On
        AllowOverride All
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.temecula-lawn-care
    DocumentRoot "E:\xampp\htdocs\temecula-lawn-care"
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.tv-sewingcenter
    DocumentRoot "E:\xampp\htdocs\tv-sewingcenter"
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost.wordpress
    DocumentRoot "E:\xampp\htdocs\wordpress"
</VirtualHost>
#6

[eluser]nZac[/eluser]
So basically, I just add something like that to my httpd.conf and I am good to go?
#7

[eluser]skunkbad[/eluser]
[quote author="nZac" date="1275392511"]So basically, I just add something like that to my httpd.conf and I am good to go?[/quote]

NO. You add it to apache/conf/extra/httpd-vhosts.conf. You'll also have to work on your hosts file, and you might have to turn on vhosts somewhere else. This is well documented all over the place.
#8

[eluser]nZac[/eluser]
So I spent most of last night trying to get that to work. In a rash decision, and out of frustration, I deleted XAMPP. So now I am back to square one. I think I am going to try creating a linux VM and run a server from there. I am not sure yet. None the less, Thanks for all your help!
#9

[eluser]danmontgomery[/eluser]
The "A" in all of these "*AMP" packages is Apache. It doesn't matter in the least which one you use, they're all just installing Apache.
#10

[eluser]nZac[/eluser]
Noctrum, I fully understand that. The problem is, these packages seem to add a level of complexity. I don't know. Maybe I am complicating more than I need to but if all of the servers are running Apache, why do we need 1000 different .htaccess files to get ride of index.php. As far I have understood it, it is because Apache is configured differently on every server. So really you are getting some flavor of Apache, still Apache, but tweaked based on how the people that compiled the package thought would be easiest.




Theme © iAndrew 2016 - Forum software by © MyBB