0

I am able to access main page on localhost but not able to access page that I have added.it is displaying 404 error.

my question is same as : https://stackoverflow.com/questions/12311737/permalinks-is-not-working-in-xampp-localhost-server-on-windows-7 but re-posting here as in that link no proper answer posted.

httpd.conf SETTINGS

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>

<Directory "E:/xampp/htdocs">
    #
    # 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.2/mod/core.html#options
    # for more information.
    #
    #Options Indexes FollowSymLinks Includes ExecCGI
    Options Indexes FollowSymLinks

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

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>

HTACCESS FILE CODE

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

# END WordPress

mod rewrite also enabled

LoadModule rewrite_module modules/mod_rewrite.so
4
  • Why is your rewrite rule RewriteRule . /perms/dev/index.php and not RewriteRule . /index.php?
    – fuxia
    Dec 26 '14 at 10:27
  • toscho perms/ is main directory and dev is my subdirectory Dec 26 '14 at 10:35
  • Well, yes, but you have set that as RewriteBase already.
    – fuxia
    Dec 26 '14 at 10:40
  • yes, I have install fresh copy of wordpress and set permalink by %postname% and with new copy permalink working fine but not working for my existing code :( Dec 26 '14 at 10:50
1

In xampp/apache/conf/httpd.conf, under Dynamic Shared Object (DSO) Support, enable mod_rewrite. Uncomment the line:

LoadModule rewrite_module modules/mod_rewrite.so

Then restart the server, and set the permalinks in WordPress again.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.