Advertisement:

Author Topic: Nice urls not working  (Read 2853 times)

caddyboy0103

  • Newbie
  • *
  • Posts: 1
Nice urls not working
« on: June 07, 2010, 10:56:19 pm »
hey i was just wondering if any one had the code to insert into the .htaccess file to fix the nice urls function. when i disable it i am able to view everything but i dont want people to see the category.php=23 i would much rather have it say for-sale-category or what ever what not. i read another post were someone wrote they had inserted a nonexistent .htaccess file and he has it working. does any one want to help me i would really appreciate it.

here is link i found on this forum showing that if the htaccess is coded right it will work.

www.hookedup.co.nz

duck

  • Newbie
  • *
  • Posts: 8
Re: Nice urls not working
« Reply #1 on: June 21, 2010, 08:53:01 pm »
I've got the same problem... I'll report back when I've worked it out

phpPig

  • Newbie
  • *
  • Posts: 1
Re: Nice urls not working
« Reply #2 on: July 21, 2010, 03:30:55 pm »
Get this worked out or no? I have this figured out if you need help, pm me.

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: Nice urls not working
« Reply #3 on: August 03, 2010, 06:42:49 pm »
The content of the .htaccess file is:

Code: [Select]
<IfModule mod_rewrite.c>

RewriteEngine On

RewriteRule -cat-(\d+)(/(\d+))?$ category.php?id=$1&page=$3 [NC,L]
RewriteRule -item-(\d+)$ item.php?id=$1 [NC,L]
RewriteRule -page-(\d+)$ page.php?id=$1 [NC,L]

RewriteRule ^feed.xml$ index.php?action=feed [NC,L]
RewriteRule ^sitemap.xml$ index.php?action=sitemap [NC,L]
RewriteRule ^contact.html$ index.php?action=contact [NC,L]

ErrorDocument 404 index.php?action=errorPage&code=404
ErrorDocument 500 index.php?action=errorPage&code=500

# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule . /index.php [L]

</IfModule>

If you still have problems, please reply this topic.

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Nice urls not working
« Reply #4 on: October 27, 2010, 03:00:34 pm »
pobably you need to insert the next line after "RewriteEngine On"

Code: [Select]
RewriteBase /path/to/osclass/folder/
If your osclass installation is on the root of your server, leave this way :

Code: [Select]
RewriteBase /
If you have it installed in osclass, then it should be something like this :

Code: [Select]
RewriteBase /osclass/

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: Nice urls not working
« Reply #5 on: October 28, 2010, 02:55:56 am »
I think the problem is rewrite engine is not working well... This problems is only occurring with categories? if you put some url like: example.com/contact Is it working well?

bashewa

  • Newbie
  • *
  • Posts: 1
Re: Nice urls not working
« Reply #6 on: November 03, 2010, 03:50:37 am »
Im also battling with the .htaccess rewrite on my server will get back when sorted out.