foevah Posted February 17, 2009 Share Posted February 17, 2009 I just installed a mini cms and I have added this site to my virtual host files. The base url is: minicms.local When I go to minicms.local in the browser I see the homepage correctly but when i click on a link thats past the index.php i got this browser message: Not Found The requested URL /whatson/ was not found on this server. wth is going on? I think it may have something to do with the .htaccess file in this site? because in the .htaccess file there is this: RewriteRule ^whatson$ /whatson/ [R] RewriteRule ^whatson/(template=([a-zA-Z]+))?$ /index.php?content=whatson&template=$2 If i go to the long url it works but the shorterned version doesnt? basically this should work but doesnt: minicms.local/whatson instead i get this: Not Found The requested URL /whatson/ was not found on this server. and for some strange reason this link works and shows me the webpage correctly: minicms.local/index.php?content=whatson&template=$2 If anyone has any ideas why the minicms.local/whatson/ doesnt work please let me know!? Quote Link to comment Share on other sites More sharing options...
premiso Posted February 17, 2009 Share Posted February 17, 2009 Make sure mod_rewrite is enabled in apache. Also make sure that you have override rights in the <Directory> tag of http.conf or vhosts.conf file. If you are not allowed to override apache's settings with .htaccess that will not work. Quote Link to comment Share on other sites More sharing options...
foevah Posted February 17, 2009 Author Share Posted February 17, 2009 in the .htaccess i already have this at the top: RewriteEngine on I have <Directory> in apache\conf\httpd.conf but its in a commented line? # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a <Directory> section to allow access to # the filesystem path. thats the only time its mentioned? how do i apply the override rights? and I dont see a <Directory> tag in the http-vhosts.conf file found in apache\conf\extra\http-vhosts.conf I just added: AllowOverride All to the .htaccess of minicms.local and it didnt change anything ? Quote Link to comment Share on other sites More sharing options...
trq Posted February 17, 2009 Share Posted February 17, 2009 Can we see http-vhosts.conf? Quote Link to comment Share on other sites More sharing options...
foevah Posted February 18, 2009 Author Share Posted February 18, 2009 # # Virtual Hosts # # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # <URL:http://httpd.apache.org/docs/2.2/vhosts/> # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # Use name-based virtual hosting. # NameVirtualHost *:80 # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any <VirtualHost> block. # <VirtualHost *:80> ServerAdmin webmaster@dummy-host.localhost DocumentRoot "M:/work/web/tools/apache/docs/dummy-host.localhost" ServerName dummy-host.localhost ServerAlias www.dummy-host.localhost ErrorLog "logs/dummy-host.localhost-error.log" CustomLog "logs/dummy-host.localhost-access.log" common </VirtualHost> <VirtualHost *:80> DocumentRoot "M:\web\websites\minicms" ServerName minicms.local </VirtualHost> Quote Link to comment Share on other sites More sharing options...
foevah Posted February 18, 2009 Author Share Posted February 18, 2009 I also have rewrite_module enabled in my apache http.conf file: LoadModule rewrite_module modules/mod_rewrite.so I installed PHP, MySQL, phpmyadmin and apache yesterday and all of these are the most current download version. I am running on XP 64bit and the only official 64bit download was for MySQL for I downloaded MySQL 64bit and the rest are 32bit. Do you think this may cause some problems? This CMS I installed works on older versions of the PHP, MySQL and Apache. I dont want to uninstall everything and try older version and have the same problem. Any more ideas people? Please help thanks Quote Link to comment Share on other sites More sharing options...
foevah Posted February 18, 2009 Author Share Posted February 18, 2009 For some strange reason when I click on a link that goes to a form it works.. Example: http://minicms.local/forms/contact/ I guess this is because the contact form actually exists in that location the url is not being rewritten.. Quote Link to comment Share on other sites More sharing options...
premiso Posted February 18, 2009 Share Posted February 18, 2009 <VirtualHost *:80> DocumentRoot "M:\web\websites\minicms" ServerName minicms.local <Directory "M:\web\websites\minicms"> AllowOverride all </Directory> </VirtualHost> Should fix it. Quote Link to comment Share on other sites More sharing options...
foevah Posted February 18, 2009 Author Share Posted February 18, 2009 premiso - I added that and now I get this message in my browser: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Quote Link to comment Share on other sites More sharing options...
premiso Posted February 18, 2009 Share Posted February 18, 2009 Check you .htaccess file and make sure nothing is askew. Reset it back to the original version you had. If you really want to check if that is the culprit, rename it or delete it and see if the webpages work. If so it is in your .htaccess file where the new problem arises. Quote Link to comment Share on other sites More sharing options...
foevah Posted March 14, 2009 Author Share Posted March 14, 2009 using this in my apache vhost file: <VirtualHost *:80> DocumentRoot "M:\web\websites\minicms" ServerName minicms.local <Directory "M:\web\websites\minicms"> AllowOverride all </Directory> </VirtualHost> I get this browser message: 500 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. When I delete the .htaccess file I can view the landing page (not get that browser message above) but when I click on a link to another page in this site I got this browser message: Not Found The requested URL /pages/news/ was not found on this server. Im not sure what the culprit is.. Quote Link to comment Share on other sites More sharing options...
foevah Posted March 14, 2009 Author Share Posted March 14, 2009 in the .htaccess file I have this: RewriteRule ^news$ /news/ [R] RewriteRule ^news/$ /index.php?content=pages&id=news&template=$2 I get a browser error message if I go to: http://minicms.local/news but if i go to the long url: http://minicms.local/index.php?content=pages&id=news&template=$2 the page displays correctly showing all news entries. wth is going on? why cant my computer figure out the url rewrite? Quote Link to comment Share on other sites More sharing options...
foevah Posted March 16, 2009 Author Share Posted March 16, 2009 I still cant fix this problem. I have installed an older version of PHP (5.2.6) and this hasnt changed a thing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.