403 Error on ModReWrites
Posted 04 September 2006 - 12:56 PM
on My Localhost I have the following code in .htaccess
The dots being the rewrite rule
I know this is correct
but I am getting 403's (Forbidden)
if I comment the lines (add # at the front)
Have I missed Something?
The root of the folder does not have an index page, as its my local machine, means I can just go to the root and click the file
if I navigate to a file, the file loads
Just the root dont.
Posted 04 September 2006 - 01:37 PM
Also make sure you have enabled the mod_rewrite module in Apaches configuration file (httpd.conf).
To enable the mod_rewrite module for Apache. Open the httpd.conf file for editing. Now look for the following:
#LoadModule rewrite_module modules/mod_rewrite.soRemove the hash (#) from the start of that line. Save httpd.conf and restart Apache.
Also if you are getting 403 forbidden it does appear something isn't right with your mod_rewrite rules/server configuration.
Posted 04 September 2006 - 03:10 PM
RewriteEngine On Options FollowSymLinks ReWriteRule ^register_me_on_site/ register.php [L]if I go to
it loads register.php as it should
So Mod ReWrites is working
but if i go to localhost/
then i get the 403 (NOTE: localhost should show directory, as there is no index page)
Posted 04 September 2006 - 03:41 PM
if you have access to your servers httpd.conf file, open it up for editing and find the following:
# The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs-2.0/mod/core.html#options # for more information. # OptionsAfter Options there'll probably be something like this after it:
FollowSymLinks IncludesAdd Indexes to end of the list, making sure you put a space between the last option in the list. So its like this:
Options FollowSymLinks Includes Indexes
Save the httpd.conf and restart Apache. You should now be able to see the directory indexes. Read the manual for information on the Options directive
Posted 04 September 2006 - 04:04 PM
<Directory "/www/"> # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs-2.0/mod/core.html#options # for more information. Options Indexes Includes # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit
God I really got to learn Apache
Posted 04 September 2006 - 04:33 PM
Options FollowSymLinksIn your .htaccess
That is over riding whats in your httpd.conf. Add (space)Indexes after FollowSymLinks now try going to localhost/
So you .htaccess is this:
RewriteEngine On Options FollowSymLinks Indexes ReWriteRule ^register_me_on_site/ register.php [L]
Posted 04 September 2006 - 04:43 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users