Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Martin Nørskov Jensen
Martin Nørskov Jensen
17,612 Points

My clean url in .htaccess are working fine on my local server but not on my sites sever

RewriteEngine on
RewriteRule ^kategori/$ /kategori/kategori.php/ [R]
RewriteRule ^kategori/([a-z_-\s]+)/$ /?type=$1 
RewriteRule ^kategori/([a-z_-\s]+)/([a-z_-\s]+)/?$ /kategori/produkt.php?type=$1&id=$2
RewriteRule ^kategori/([a-z_-\s]+)/([a-z_-\s]+)/([0-9]+)?$ /kategori/produkt.php?type=$1&id=$2&slags=$3
cecil merrell
cecil merrell
6,873 Points

when you upload the file to your live server, make sure the file permissions are set correctly for that file, set it to 755

Andrew Shook
Andrew Shook
31,709 Points

Allow make sure you have Apache mod_rewrite installed an turned on.

geoffrey
geoffrey
28,736 Points

Martin Nørskov Jensen setting the permissions correctly to that file was the solution !?

1 Answer

Martin Nørskov Jensen
Martin Nørskov Jensen
17,612 Points

No i use one.com and it just worked after some time without me having to do anything