404 Not Found errors... htaccess issue
jecz
Join date: Mar 6th 2011
Community posts: 14
View Profile
Send Message
+Follow
Macbook Pro, MAMP, PHP 5.3.2

I receive "404 Not Found" errors on links from homepage. Caused by htaccess missing? Am I barking up the right tree?

There was a reference to .htaccess in the installation instructions but I can't find that file on my machine. Any help would be greatly appreciated.
Mar 7th 2011, 1:59 am
emjhie
Join date: Sep 27th 2010
Community posts: 91
View Profile
Send Message
+Follow
if not see htacces, make new file. Created new file on root with code below.

name of file :
.htaccess

.htaccess code:

<IfModule mod_rewrite.c>
RewriteEngine on
# To append a query string part in the substitution string
RewriteRule ^([0-9a-z_/\-]+)/$ index.php\?p=$1 [QSA]
RewriteRule ^([0-9a-z_/\-]+)$ index.php\?p=$1 [QSA]
</IfModule>


[url]http://jcow.bulkum.com[/url]
Mar 7th 2011, 8:34 pm
jecz
Join date: Mar 6th 2011
Community posts: 14
View Profile
Send Message
+Follow
Awesome! Working now.

-Jim
Mar 9th 2011, 8:51 pm
kbchandak
Join date: May 12th 2011
Community posts: 1
View Profile
Send Message
+Follow
I have .htaccess file with the content as mentioned but still it is giving errors.
May 12th 2011, 7:23 pm
sarkarijobdaily
Join date: Feb 27th 2019
Community posts: 2
View Profile
Send Message
+Follow
<IfModule mod_expires.c>
Options +FollowSymLinks
RewriteEngine On

# index.php remove google search no need 404 php

RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

# ?p= remove
RewriteCond %{THE_REQUEST} ^GET\ /\?(([^&\s]*&)*)p=([^&\s]+)&?([^\s]*)
RewriteRule ^(.*)$ /%3?%1%4 [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# jcow work
RewriteRule ^(.*)$ index.php?p=$1 [QSA]


# Images
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"

# Video
ExpiresByType video/mp4 "access plus 1 year"
ExpiresByType video/mpeg "access plus 1 year"

# CSS, JavaScript
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"

# Others
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
</IfModule>
Mar 21st 2019, 5:54 pm