Jump to content
The Uniform Server Community
frclo

Mod_rewrite Wordpress Help Please

Recommended Posts

I'm using Uniform Server 3.5-Apollo on WinXPpro. Doing a test of Wordpress v2.6.1. Trying to create custom permalinks, which according to Wordpress codex http://codex.wordpress.org/Using_Permalinks requires mod_rewrite enabled. When I change the permalink from default in WP I get 403 error message

You don't have permission to access /wordpress/wp-admin/options-permalink.php on this server.

Apache/2.0.59 (Win32) DAV/2 PHP/5.2.3 Server at localhost Port 80

and I can't login into the admin panel, also an .htaccess file is created as follows:

 

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

# END WordPress

This error is in the Apache log file:

[client 127.0.0.1] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: W:/www/wordpress/wp-admin/options-permalink.php, referer: http://localhost/wordpress/wp-admin/options-permalink.php

As noted in previous posts on this issue I changed the .htaccess file to this:

# BEGIN WordPress
Options +FollowSymLinks
#Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

# END WordPress

I'm then able to log back in to the WP admin panel. However, when I change the permalink setting and save I get the 403 error again. Also .htaccess has been rewritten with Options +FollowSymLinks removed.

 

Any suggestions on correcting this problem?

Share this post


Link to post
Share on other sites

If you change permalink settings every thing between # BEGIN WordPress and # END WordPress are rewritten by Wordpress. Hence place Options +FollowSymLinks outside this block.

 

Options +FollowSymLinks

# BEGIN WordPress

#Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

# END WordPress

I noticed in your last post you made the file read only. That’s OK Wordpress only needs to set the file up once unless you want to change the settings again.

 

All the best

Ric. :blink:

Share this post


Link to post
Share on other sites

That's even better since I haven't decided on a permalink format yet!

 

Thanks for your reply Ric.

 

Frank

 

 

If you change permalink settings every thing between # BEGIN WordPress and # END WordPress are rewritten by Wordpress. Hence place Options +FollowSymLinks outside this block.

 

Options +FollowSymLinks

# BEGIN WordPress

#Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

# END WordPress

I noticed in your last post you made the file read only. That’s OK Wordpress only needs to set the file up once unless you want to change the settings again.

 

All the best

Ric. :blink:

Share this post


Link to post
Share on other sites

Wordpress 3.1 and Uniserver 7.0

 

If I select to mod rewrite, it will generate the .htaccess code according to Wordprss specifications - but it breaks the site. Using the "Options +FollowSymLinks" has no impact.

 

.htaccess:

 

-------------------------------------------------------

 

Options +FollowSymLinks

 

# BEGIN WordPress

 

#Options -Indexes

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /wordpress/

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /wordpress/index.php [L]

</IfModule>

 

# END WordPress

 

------------------------------------------------------

 

 

Caps

Share this post


Link to post
Share on other sites

This is an old topic but I wanted to bring it up just for future reference.

I noted that in your rewriting rules you are trying to point to your /wordpress folder. That tells me that your wordpress installation in under example.com/wordpress folder.

 

Enable Permlinks "/%postname%" without quotes

 

Edit your .htaccess as follow

 

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

 

Copy your wp-config.php and index.php to your root folder. (example.com/)

 

Edit index.php

 

/** Loads the WordPress Environment and Template */

require('./wordpress/wp-blog-header.php');

 

 

Hope this helps

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...

×
×
  • Create New...