Home > Software design >  .htaccess php seo url
.htaccess php seo url

Time:01-28

i have problem with seo links

website.com/member/.htaccess code:

RewriteEngine on
RewriteBase /member/
RewriteRule ^([0-9]{1,15})-(.*).html$ profile.php?id=$1 [L,NC]

website.com/member/123-nickname.html working fine but i want that link:

website.com/member/123/nickname.html i trying this .htaccess code:

RewriteEngine on
RewriteBase /member/
RewriteRule ^([0-9]{1,15})/(.*).html$ profile.php?lookup=$1 [L,NC]

url working but website looks like without .css

how to fix problem?

CodePudding user response:

My guess is that you're using relative URLs for your styles. Browser tries to find CSS file starting form the /member/123/ directory. Try setting absolute URL, or add it to a base tag: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base

  •  Tags:  
  • Related