Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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