Title: rewrite can not work
Last modified: September 1, 2016

---

# rewrite can not work

 *  [amila](https://wordpress.org/support/users/flatworld21/)
 * (@flatworld21)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/rewrite-can-not-work/)
 * I installed wordpress and set the like to be “/archives/%post_id%”
    But all the
   pages can not be accessed. I checked .htaccess and found no problem
 * my phpinfo
    [http://flatvpn.com/phpinfo.php](http://flatvpn.com/phpinfo.php)
 *     ```
       RewriteEngine On
   
       RewriteBase /
   
       RewriteRule ^index\.php$ - [L]
   
       # add a trailing slash to /wp-admin
   
       RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
   
       RewriteCond %{REQUEST_FILENAME} -f [OR]
   
       RewriteCond %{REQUEST_FILENAME} -d
   
       RewriteRule ^ - [L]
   
       RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
   
       RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
   
       RewriteRule . index.php [L]
   
       # 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
   
       # Wordfence WAF
       <IfModule mod_php5.c>
       	php_value auto_prepend_file '/var/www/html/wordfence-waf.php'
       </IfModule>
       <Files ".user.ini">
       <IfModule mod_authz_core.c>
       	Require all denied
       </IfModule>
       <IfModule !mod_authz_core.c>
       	Order deny,allow
       	Deny from all
       </IfModule>
       </Files>
   
       # END Wordfence WAF
       ```
   

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Joey – a11n](https://wordpress.org/support/users/jricketts4/)
 * (@jricketts4)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/rewrite-can-not-work/#post-7606721)
 * If I read correctly this is the answer you may be looking for.
 * “Archive pages, whether post type archive pages, category archives, date archives
   etc, search pages, single pages and the homepage are pseudo pages, in other words,
   fake pages. They don’t have ID’s as they do not exist because they are not created
   pages which is saved in the db
 * These pages “inherits” the ID of the specific post or archive they display, although
   they still don’t have an ID themselves, accept the homepage, date archives, search
   pages and post type archive pages
 * So, in short, your custom post archive page will not have an ID.”
 * [Credit](http://wordpress.stackexchange.com/questions/175226/cant-get-post-id-on-page-that-is-a-custom-post-type-archive)
 *  Thread Starter [amila](https://wordpress.org/support/users/flatworld21/)
 * (@flatworld21)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/rewrite-can-not-work/#post-7606722)
 * Thanks!
    I changed link to the following type: [http://flatvpn.com/2016/07/sample-post/](http://flatvpn.com/2016/07/sample-post/)
 * But still can not open all the pages.
 *  [Joey – a11n](https://wordpress.org/support/users/jricketts4/)
 * (@jricketts4)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/rewrite-can-not-work/#post-7606736)
 * When you go to that specific post is that the url it is showing?
 *  [Joey – a11n](https://wordpress.org/support/users/jricketts4/)
 * (@jricketts4)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/rewrite-can-not-work/#post-7606739)
 * And are you changing each individual link to that new structure or changing the
   structure under your permalink settings? They should all change automatically
   when you change your permalinks, but I would double check to make sure that they
   did.
 *  Thread Starter [amila](https://wordpress.org/support/users/flatworld21/)
 * (@flatworld21)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/rewrite-can-not-work/#post-7606757)
 * I checked every
    Maybe rewrite is not working
 * I can only open pages by this kind of permalink
    [http://flatvpn.com/?p=123](http://flatvpn.com/?p=123)
 *  Thread Starter [amila](https://wordpress.org/support/users/flatworld21/)
 * (@flatworld21)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/rewrite-can-not-work/#post-7606778)
 * Ok I solved by
 * follow (AllowOverride none)
 * and change to
 * (AllowOverride All)
 * in
 * /etc/httpd/conf/httpd.conf
 *  [Joey – a11n](https://wordpress.org/support/users/jricketts4/)
 * (@jricketts4)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/rewrite-can-not-work/#post-7606901)
 * Ok great, glad we got it fixed.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘rewrite can not work’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [Joey – a11n](https://wordpress.org/support/users/jricketts4/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/rewrite-can-not-work/#post-7606901)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
