View Full Version : PhpLD 2.2: .htaccess Mods Problem
xclusive
11-24-2008, 03:55 PM
I've just downloaded phpLD 2.2 and installed it without any trouble. Now I want to re-write the .htaccess so that I've SEO Friendly url for categories and sub-categoris. And that is where I am having trouble now.
Can someone please help? I've created a category called "test" and this is what I've in the .htaccess file but it's not working.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^test(.*) index.php
I've just done this as a sheer guess. I'd really really appreciate if anyone could help me here.
Thanks in advance.
James
11-24-2008, 06:10 PM
IF using apache and not IIS
try adding
RewriteBase /
right after
RewriteEngine On
xclusive
11-25-2008, 12:47 AM
Thanks for the heads up james. This is what I've and it still doesn't work. Any ideas? And yes it's apache.
RewriteEngine on
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^test2(.*) index.php
xclusive
11-25-2008, 01:42 PM
I've been watching this thread since yesterday. Is anyone willing to help? Please tell me if I am just wasting my time.
bruleo
11-25-2008, 02:20 PM
You've got the rewrite base commented out...
Change '#RewriteBase /' to 'RewriteBase /'
Bruce.
James
11-25-2008, 04:28 PM
oh goodness
What is this ????
RewriteRule ^test2(.*) index.php
Change that back to the default htaccess rule please
xclusive
11-26-2008, 02:13 AM
Content visible to registered users only.
Can you please give an example James? I've no idea about htaccess. What would be the default htaccess rule?
James
11-26-2008, 02:27 AM
The one that is in the htaccess file in the download.
xclusive
11-26-2008, 01:14 PM
ok, this is what I've now. But it still doesn't work. Any idea? Do I've have to do anything from the backend admin? Please help.
#################################################
## PHP Link Directory - Apache Server Settings ##
#################################################
# Protect files
<Files ~ "^(.*)\.(inc|inc\.php|tpl|sql)$">
Order deny,allow
Deny from all
</Files>
# Protect directories
<Files ~ "^(files|images|include|lang|libs(/.+)?|temp(/.+)?|templates(/.+)?|javascripts(/.+)?)$">
Order deny,allow
Deny from all
</Files>
# Disable directory browsing
Options -Indexes
# Follow symbolic links in this directory
Options +FollowSymLinks
# Set the default handler
DirectoryIndex index.php
# URL rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
## Category redirect
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
xclusive
11-26-2008, 02:05 PM
Thanks a lot for your help guys..it's working finally...
polosas
11-27-2008, 07:34 PM
this thread helped me to solve 404 error
thx !!! xclusive and James.. i finally make my site url rewrite works!!! thanks!!!! James...
uguronur
02-26-2009, 11:52 AM
Content visible to registered users only.
why dont you share with us....? :confused:
David
02-26-2009, 12:08 PM
Content visible to registered users only.
What problem are you having?
gmschmitz
05-03-2009, 11:20 PM
How did you get this fixed? I did a fresh install yesterday and now just started adding categories. When I click the category it doesn't take me to that page it gives me a 404. If I shut off MOD rewrite it works fine. Checked my .htaccess file and everything is the same as when I installed it. took the comment off of RewriteBase / and nothing and it redirects to my home page.
Any help would be great.
James
05-04-2009, 12:34 AM
did you rebuild the category cache after enabling rewrite?
gmschmitz
05-04-2009, 03:16 AM
How do you do this in Version 2.2
James
05-04-2009, 03:17 AM
you dont thought it was 3.x
gmschmitz
05-04-2009, 03:57 AM
Any other suggestions out there. The url is www.missingpetads.com/resources all urls 404 with Mod rewrite on.
James
05-04-2009, 04:25 AM
RewriteBase /resources
gmschmitz
05-04-2009, 03:55 PM
Thanks James, it's funny I was thinking about this last night while I was trying to sleep and I said the same thing to myself. Sometimes you forget the obvious :) Thanks again !!
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.