- This topic is empty.
-
AuthorPosts
-
November 18, 2014 at 3:48 pm #188658CameronDuthieParticipant
Hi there,
I’ve just not long finished a site build here.
It’s a php site that uses perch as a cms, after i finished putting the site together i wanted to get rid of the file extensions in the URLs.
Naturally, i used a redirect in my .htaccess file which seemed to work fine and dandy until i tried to view one page, being this one where i get a very helpful note stating that i’m “Forbidden – You do not have permission to access this document.”
I’ve checked my permissions with the server and it appears that i do in fact have full permissions for that page.
Would anyone know why i apparently don’t have permissions for that page or why the re-direct doesn’t appear to be working when it works perfectly fine for every other page?
For example this works fine,
http://miller-business.com/charities
http://miller-business.com/charities.php
But this doesn’t,
http://miller-business.com/coaching
http://miller-business.com/coaching.php
Here’s a peek at my rewrite rule,
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php </IfModule>
Any help would be greatly appreciated.
Many thanks! :)
November 18, 2014 at 4:17 pm #188664AlenParticipantTry this:
Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L]
November 18, 2014 at 4:25 pm #188665CameronDuthieParticipantThanks for getting back to me Alen. :)
Unfortunately that didn’t work.
It’s the darndest thing, i’ve even tried creating a new page under ‘coaching-1.php’ (which works like all the other pages) then deleting the old ‘coaching’ page then changing the new file name to ‘coaching’.
It’s almost like the server doesn’t like the word ‘coaching’ or something…
November 18, 2014 at 4:26 pm #188666CameronDuthieParticipantThanks for getting back to me Alen. :)
Unfortunately that didn’t work.
It’s the darndest thing, i’ve even tried creating a new page under ‘coaching-1.php’ (which works like all the other pages) then deleting the old ‘coaching’ page then changing the new file name to ‘coaching’.
It’s almost like the server doesn’t like the word ‘coaching’ or something…
November 18, 2014 at 4:38 pm #188667AlenParticipantDo you have a folder under the same name? I see that it keeps adding forward slash which it should not be happening.
November 18, 2014 at 5:37 pm #188670__ParticipantDo you have a folder under the same name?
my thought as well.
November 19, 2014 at 12:13 am #188690CameronDuthieParticipantGuys, thank you so much. That’s exactly what is was…feel so stupid now.
Thanks again! :)
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.