Jump to content

The requested URL was not found.. - base url works but deeper links dont?


foevah

Recommended Posts

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!?

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

#

# 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>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 4 weeks later...

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..

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.