css - remove php extension using .htaccess -


i'm working on script, , want set links following:

www.mysite.com/sign-up.php www.mysite.com/sign-up 

and

www.mysite.com/profile.php?username=abc www.mysite.com/profile/abc 

i found code , works me.

rewriteengine on rewritecond %{request_filename} !-d rewritecond %{request_filename}\.php -f rewriterule ^(.+)$ $1.php [l,qsa] 

but when want access:

www.mysite.com/profile/abc 

the stylesheet doesn't work, seems path has changed. links in profile become like:

www.mysite.com/profile/profile/filename.php

it keeps adding /profile everytime

how fix this?

edit: files works fine stylesheet except profile.php

you can create htacess , modrewrite of apache.

just check link below generating dynamic url. might solve problem:

url generation


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -