SourceForge.net Logo

htaccess not working *SOLVED*

Posted by Lars 

Use promo code YALD for $10 off

htaccess not working *SOLVED*
December 01, 2009 12:08PM
Smooth install, but when I tried to make the SEO Friendly URL's work, no dice (GoDaddy Hosting on *NIX server).... and you said you didn't like your .htaccess file anyway.. so I took matters into my own hands.

Instructions for installing into a folder: /yald/

==========================================================
1. Install YALD (this guide assumes you installed in the folder /yald/ and you want the directory to come up when you go to that folder.)

2. Rename directory.php to index.php
2a. Open your yald\inc\config.php file and add the following line before the closing ?>
$settings['directory_index'] = 'index.php';

3. Set the following settings in your admin panel under "config":

Link Type: Direct Linking
Category URL Format: Basic search engine friendly
Rewrite URL: /yald/index.html/

4. To fix the Suggest a Link:
Edit the index.php - go to line 178 and replace this:

$template->assign('suggest_url',$settings['mod_rewrite_url'].'suggest.php?category='.$category);
with this:

$template->assign('suggest_url','/yald/suggest.php?category='.$category);

5. Use this as your .htaccess file IN THE YALD FOLDER - * NOT * IN THE ROOT.

RewriteEngine On
RewriteBase /yald/

# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# this makes it so if you go to [www.YourDomain.com] it gives you [www.YourDomain.com]

RewriteRule index.html/(.*)_(.*)?$ index.php?viewcat=$1 [L,QSA]


# this makes it so if you go to [www.YourDomain.com] *OR* [www.YourDomain.com] it will actually work.

RewriteRule index.html/?$ index.php [L,QSA]



===========================================
Notes: For whatever reason if I tried to make the URL Rewrite work using something like "yald/directory/" it wouldn't work, but if I used "yald/index.html" it does.

I'm just winging it here on the .htaccess stuff :-p

You can see this installed here: [www.cpapdiscountstore.com]

Nice product.



Edited 1 time(s). Last edit at 12/01/2009 12:09PM by Lars.
Re: htaccess not working *SOLVED*
December 09, 2009 12:39AM
Thank you for posting this. I'll have to make a link to it in the FAQ.

--------------------------------
-newbie455
the YALD developer

I can do custom modifications. For more information or for a quote, use the contact form or PM me.
If you use the script, please consider making a donation to help offset development time.
Sorry, only registered users may post in this forum.

Click here to login

Project by EoTz.com