0

I have kind of a complicated setup. When you go to my website you can see that on the menu bar each place is Home|Blog|Forum ... etc. Each of those are part of rewrite rules. IE: Blog is actually index.php?page=blog.php FWIW in my code i wrote it so it hides the .php of those files.

So, going to my Blog section, where wordpress resides you will see that it does indeed display the default setup for wordpress. I know the page formatting is off, but that is because i'm trying to fix this first.

Here is my wordpress .htaccess

Options +FollowSymlinks +Includes +SymLinksIfOwnerMatch +ExecCGI -MultiViews -Indexes
<files .htaccess>
   Order allow,deny
   Deny from all
</files>

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

If you click "Read More" in the page post, it redirects you to /admin/hello-world/ but the redirection is a 404 not found. I dunno why this is.

Your help will be much appreciated and will save the other half of my hair that is left on my head. :D

-Jon

10
  • There is no "redirect" to /admin. The link being generated is already an /admin/ link. What is the code that creates that creates the link? What else have you modified?
    – s_ha_dum
    Commented Nov 15, 2015 at 2:22
  • I have no clue what code creates the /admin/hello-world/ links as it's a permalink setting in wordpress. i set the custom permalink to /%author%/%postname%/.
    – Erialos
    Commented Nov 15, 2015 at 3:03
  • Well, that answered the question whether you meant to or not :) Have you switched to a bundled theme to see if the problem occurs there too?
    – s_ha_dum
    Commented Nov 15, 2015 at 3:08
  • Hahhah. Im glad it did answer it. No i have not tried switching to a bundled theme. What do you mean by bundled theme or i guess the better question is, where do i get one so i can try. Oh and I am using a theme other than what came with wordpress. It's called DarkElements IIRC.
    – Erialos
    Commented Nov 15, 2015 at 4:26
  • I googled after i asked. :P Looks like what i saw from my quick search is that bundled themes cost $$$. I'm almost positive that this is a rewrite rule issue. I just don't know what to fix.
    – Erialos
    Commented Nov 15, 2015 at 4:29

1 Answer 1

0

All i had to change, which was so stupidly simple, was my wordpress .htaccess file to this.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ../index.php?page=blog [L,NC]
</IfModule>

A few issues remain unanswered but i'm calling this an answer to my main question about getting Pretty Permalinks working with my site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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