|
|||||||
| Home Demo Buy Noah Downloads Support Public Forum Documentation Blog FAQ | |||||||
|
Noah's Documentation
Table of Contents
Nice URL featureNoah's Classifieds supports using nice URLs. This means for example that the link of an ad details page can look like this: http://your.classifieds.site/item/10 instead of the conventional URL: http://your.classifieds.site/index.php?item/10 Besides that the former one is nicer, it is also said to be more search engine friendly. Enabling the Nice URL feature
Rewriting URLs in Apache is done through the mod_rewrite module of Apache 1 or Apache 2. If you click on the
The rewrite module is enabled in LoadModule rewrite_module modules/mod_rewrite.so
If the rewrite module is available, you should have a file under the classifieds installation directory called <IfModule mod_rewrite.c> RewriteEngine on RewriteRule .* - [env=REWRITE_ON:1] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [L] </IfModule>
Note that Noah's Classifieds is actually installed with this default TroubleshootingInaccessible pagesIf you experience inaccessible, forbidden, or in other ways destructed pages, you should also check the following:
<Directory /path/to/noah> AllowOverride All </Directory>
Options +FollowSymlinks RewriteEngine on ...etc.
RewriteEngine on RewriteBase /noah
... RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /index.php?url=$1 [L] ... mod_rewrite is available, but the program can't detect that it is enabledThere was one more strange case when the mod_rewrite was actually available on a server and usable, but the program still “thought” so that it is not enabled (and therefore generated the conventional URLs). If was caused by that the following line in the .htaccess file - from whatever reason - couldn't pass the information that mod_rewrite is enabled to the program: RewriteRule .* - [env=REWRITE_ON:1] We don't know the reason why it happens (probably because this way of setting environment variables is disabled in the global Apache configuration), but if you suspect that this happens, you can use the following workaround: add this line into 'app/config.php: $_SERVER[“REWRITE_ON”]=1; (so the end of the file should look like this): ... $_SERVER["REWRITE_ON"]=1; ?> This tells the program that the mod_rewrite is enabled whatever comes from the .htaccess file. Blank pagesIn case of sites where Php is installed as a CGI module, it can happen that you get blank pages. Try to insert the following line into 'app/constants.php' to fix this: $_SERVER["QUERY_STRING"] = $_SERVER["REDIRECT_SCRIPT_URL"]; Notes
... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/stats/(.*)$ ... |
|||||||