We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24217
    • 7 Posts
    window server 2003 and XAMPP with iis 6.0 installed.

    i was supposed to use my testing server for the prodution one. so far the testing server works just fine locally, but today i tried thousand times to make the testing one online, as my subjest says, it entirely failed.

    no matter what i tried, it always gose to XAMPP for Windows page. anybody knows what is wrong with my modifications?

    the following things are what i did, accroding to
    # If your MODx installation is in a subdirectory, change the following line to match the physical
    # path to the "root" of the site as follows:
    # RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]

    because my site was placed at C:\Program Files\xampp\htdocs\mysite\

    the modification i made:
    RewriteRule ^(.*)$ /mysite/index.php?q=$1 [L,QSA]
    RewriteRule ^(.*)$ /htdocs/mysite/index.php?q=$1 [L,QSA]
    RewriteRule ^(.*)$ /xampp/htdocs/mysite/index.php?q=$1 [L,QSA]
    RewriteRule ^(.*)$ /Program Files/xampp/htdocsmysite/index.php?q=$1 [L,QSA]

    nothing works!

    please help me even if it is not a complicated question!!!
    THX!
      • 24217
      • 7 Posts
      keep waiting!!!
      please give a help!!!!!!!!!!!!!!!!!!!!!!!!
      • RewriteRule ^(.*)$ /mysite/index.php?q=$1 [L,QSA] would be the correct one. There is something else wrong here if that did not work.

        I do not know anything about working on a Windows-based server, so I can’t go much further.

        You are trying to access http://whatever.com/mysite? That default page would be http://whatever.com.

        Are you sure that you turned on friendly URLs in the Manager?

        Are you sure that you renamed the ht.access to .htaccess?

        That’s all I can think of.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 26439
          • 104 Posts
          Quote from: questionmark at Jun 03, 2006, 04:52 PM

          i was supposed to use my testing server for the prodution one. so far the testing server works just fine locally, but today i tried thousand times to make the testing one online, as my subjest says, it entirely failed.

          Just curious, but what were you running as your testing server?

          I ask as I’m pretty sure that .htaccess doesn’t work on a windows server.
          • That’s an IIS server. Works fine for Apache.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
            • You mentioned having XAMPP and IIS, but sounds like you have disabled IIS and have XAMPP’s Apache web server running, so...just make sure you check the thread here about using XAMPP with MODx, specifically for enabling the mod_rewrite module, and allowing htaccess to override settings in your document root.

              [edit: a quick search on ’xampp’ brought up a lot of information about XAMPP and rewrite rules and friendly url’s]

              .htaccess works fine on Windows machines using XAMPP, but requires some manual configuration to get it working in general (nothing to do with MODx).
                • 14460
                • 3 Posts
                In your htdocs folder is an index.php file, with the following content:

                <?php
                if (!empty($_SERVER[’HTTPS’]) && (’on’ == $_SERVER[’HTTPS’])) {
                $uri = ’https://’;
                } else {
                $uri = ’http://’;
                }
                $uri .= $_SERVER[’HTTP_HOST’];
                header(’Location: ’.$uri.’/xampp/’);
                exit;
                ?>
                Something is wrong with the XAMPP installation :-(


                The bold line is pointing to your xampp folder.
                If you change it to header(’Location: ’.$uri.’/yourmodxfolder/’) it will work.

                The nicest solution is replace the default index.php in you htdocs folder with an index.php file with the following content:
                <?php
                header('Location: '.$uri.'/yourmodxfolder/');
                ?>
                  • 24217
                  • 7 Posts
                  many thanks for all your help!

                  theese days i tried a lot, unfortunately, all the solutions dont work.

                  1) i had truned on the FURL (must i turn it on?)
                  2) i had changed the index.php located at my C:\Program Files\xampp\htdocs\ as below
                  <?php
                  	if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
                  		$uri = 'https://';
                  	} else {
                  		$uri = 'http://';
                  	}
                  	$uri .= $_SERVER['HTTP_HOST'];
                  	[color=red]header('Location: '.$uri.'/mysite/');[/color]
                  	exit;
                  ?>
                  Something is wrong with the XAMPP installation :-(
                  

                  3) i also fixed the ht.access file placed at C:\Program Files\xampp\htdocs\mysite
                  # If your MODx installation is in a subdirectory, change the following line to match the physical
                  # path to the "root" of the site as follows:
                  # RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]

                  RewriteRule ^(.*)$ /mysite/index.php?q=$1 [L,QSA][/quote]
                  4) by using command "inetmgr", i start running IIS for my site.
                  5) enable rewrite function
                  in xampp/apache/conf/httpd.conf
                  LoadModule rewrite_module modules/mod_rewrite.so
                  and
                  AllowOverride All

                  now it displays "can not find the page, http error 404" etc...

                  something wrong with my IIS setup? or any possible errors i made? thanks in advance!