문제

How can I make this link(s)

http(with or without s)://(with or without www).puaction.com/articles/Top-7-Best-Pheromone-Colognes-for-Men

looks like this :

https://puaction.com/Top-7-Best-Pheromone-Colognes-for-Men

each folder inside articles directory will displayed without the article directory so...

http(with or without s)://(with or without www).puaction.com/articles/(any article)

will be (non www / https / article directory will not be displayed by the end user)

https://puaction.com/ {any article name}
도움이 되었습니까?

해결책

You can use this code in root .htaccess:

RewriteEngine On

RewriteCond %{THE_REQUEST} \s/+articles/([\S+) [NC]
RewriteRule ^ https://puaction.com/%1? [R=301,L,NE]

RewriteRule ^([^/.]+)/?$ /articles/$1 [L]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top