Seo Friendly Url css img js not working
source link: https://www.codesd.com/item/seo-friendly-url-css-img-js-not-working.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Seo Friendly Url css img js not working
I want to make my URL as SEO Friendly URL. I tried editing .htaccess file by rewriting rule
RewriteRule ^swift-details/([0-9]+)/([0-9a-zA-Z_-]+)$ swift-details.php?id=$1 [NC,L]
RewriteRule ^swift-details/(css|js|img)/(.*)?$ /$1/$2 [L,QSA,R=301]
It's routing the correct URL but in that page CSS JS and images are not working.
example URL:
http://www.bankhints.com/swift-details/2/abblinbb
You dont need the second rewrite rule. Your CSS/JS paths are all 'relative' to your current location.
Your CSS exists here: /css/normalize.css
Your page is looking here: /swift-details/2/abblinbb/css/normalize.css
All you need is 'forward-slashes' before your CSS/JS paths.
Related Articles
htaccess page to page redirect and seo friendly urls
SEO friendly URL in classic ASP?
CSS transition will not work overflight
SEO friendly url in PHP htaccess
Seo friendly urls with Zend router
The Nginx configuration changes to use wordpress seo-friendly URLs
Do SEO-friendly URLs really affect the ranking of a page?
SEO Friendly URL
SEO friendly URLs for static cshtml pages in MVC
SEO friendly URLs for a multilingual site
The jquery .css () method does not work
PHP Seo Friendly URL
The "right" CSS tag does not work as expected using percentages
Joomla and SEO Friendly URLs
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK