Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Not Found - RewriteBase Issue

Started by Muut Archive 12 years ago · 12 replies · 569 views
12 years ago

Hi,

Unzipped Shop skeleton to 'C:\wamp\www\mysite'.
I can open Home page, but any other page displays 404 Apache-style error. I've already went through Troubleshooting section, but with no luck.

Windows 8.1

Apache 2.4.9

PHP 5.5.12

Hope you could help. Thanks!

12 years ago

Can you provide your setup info and .htacess?

12 years ago

I've tried to change '/' before RewriteBase to '/mysite', '/mysite/', '/mysite/shop', '/mysite/shop/', '/www/mysite' etc., non of my guesses worked.

Here is my .htaccess.

MARKDOWN
<IfModule mod_rewrite.c>

RewriteEngine On

##
# If you are getting 404 errors on subpages, you may have to uncomment the RewriteBase entry
# You should change the '/' to your appropriate subfolder. For example if you have
# your Grav install at the root of your site '/' should work, else it might be something
# along the lines of: RewriteBase /<your_sub_folder>
##

 RewriteBase /mysite

# Access site
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L] 

# Block various user files from being accessed directly
RewriteRule ^user/accounts/(.*)$ error [R=301,L]
RewriteRule ^user/config/(.*)$ error [R=301,L]
RewriteRule ^user/(.*)\.(txt|md|html|php|yaml|json|twig|sh|bat)$ error [R=301,L]

# Block cache/
RewriteRule ^cache/(.*) error [R=301,L]

# Block bin/
RewriteRule ^bin/(.*)$ error [R=301,L]

# Block system/
RewriteRule ^system/(.*)$ error [R=301,L]

# Block vendor/
RewriteRule ^vendor/(.*)$ error [R=301,L]

</IfModule>

# Prevent file browsing
Options -Indexes

I am not sure if I understand about setup info.

12 years ago

Oh, I forgot to tell you,
I unzipped skeleton folder to C:\wamp\www\, and then renamed skeleton's folder to 'mysite'.

12 years ago

Ok I assume you tried first without uncommenting the RewriteBase? If that's the case then RewriteBase should fix it. Can you try removing the space before the RewriteBase command?

12 years ago

I tried both, without uncommenting the RewriteBase, and with removing the space before the RewriteBase command, doesn't help.

12 years ago

How did you get apache installed on your windows machine? WAMP, EasyApache, XAMPP etc? I might have to try to replicate the issue myself.

BTW any messages in the apache error log?

12 years ago

I installed 'wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe' from
http://www.wampserver.com

Here is the Apache error log

TXT
[Tue Sep 16 22:54:50.649955 2014] [mpm_winnt:notice] [pid 3756:tid 528] AH00455: Apache/2.4.9 (Win32) PHP/5.5.12 configured -- resuming normal operations
[Tue Sep 16 22:54:50.649955 2014] [mpm_winnt:notice] [pid 3756:tid 528] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:13:13
[Tue Sep 16 22:54:50.649955 2014] [core:notice] [pid 3756:tid 528] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.9'
[Tue Sep 16 22:54:50.658955 2014] [mpm_winnt:notice] [pid 3756:tid 528] AH00418: Parent: Created child process 4696
[Tue Sep 16 22:54:53.465116 2014] [mpm_winnt:notice] [pid 4696:tid 448] AH00354: Child: Starting 64 worker threads.

Thank you for helping!

12 years ago

OK, i have no more bright ideas until I can replicate this myself. Could you do me a favor and try with XAMP or EasyApache? I've tested those both recently. Thanks.

12 years ago

Sure, I'll try with XAMP and EasyApache.

12 years ago

Yep,
with XAMP everything works like a charm!
Thank you, Rhukster!

12 years ago

Well I just spent an hour trying to get WAMP running, and have been having all kinds of DLL issues and i'm not sure if its my virtual machine or what or my version of Windows 8.

However, from what I've read about WAMP you have to manually enable the rewrite_module in the Apache Modules configuration as it doesn't come enabled by default.

http://www.steptoinstall.com/wamp-500-internal-server-error-htaccess-php-codeigniter.html

I think you are much better off with XAMPP frankly :) Seems a much more robust solution for windows.

12 years ago

I have updated the troubleshooting docs based on your observations. Thanks!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1279 9 years ago
Archive · by Muut Archive, 9 years ago
2 886 9 years ago
Archive · by Muut Archive, 9 years ago
2 4015 9 years ago
Archive · by Muut Archive, 9 years ago
1 2891 9 years ago
Archive · by Muut Archive, 9 years ago
3 1075 9 years ago