Setup friendly url / mod rewrite wordpress on apache/php

Posted: June 26, 2013 in web

Make sure “LoadModule rewrite_module modules/mod_rewrite.so” is enabled (not commented) on apache.

httpd.conf (Apache)

ServerName localhost:80

DocumentRoot "C:/wamp/www/newSite"

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>

<Directory "c:/wamp/www/">
    Options Indexes FollowSymLinks

    AllowOverride all

#   onlineoffline tag - don't remove
    Order Deny,Allow
    Allow from all
</Directory>

.htaccess (www/html)


# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

# END WordPress

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s