CSS not loading after URL rewriting
I am trying to rewrite URL from example.com/test.php?id=hd3j3 to example.com/id/hd3j3. The problem is rewriting occurs and I am taken to the page but the css and js of the page doesn't load. Where am I going wrong? .htaccess RewriteBase / RewriteEngine On RewriteRule ^id/([A-Za-z0-9]+)$ test.php?id=$1 [L]
Your rewrite rule looks right for me. Maybe your css gets loaded from a relative path and not absolute ? <link href="css/layout.css"> The browser try to load from example.com/id/css/layout.css instead of example.com/css/layout.css
Try to clear the cache and retry ! This usually works.Or set the root path correctly. If these won't work try this, If you want to use image tag and show to correctly images, use " />
How to do a PHP POST to external webapi in Grav CMS?
Add low stock alert on category page magento 1.9.3
Wordpress + ACF: the_title and the_permalink repeat values through loop
Magento: Adding a 2nd Contact Form with a new form action
Update all entries with old date SQL in PHP
PHPUnit test method is called multiple times with specific arguments in no specific order
Inserting form data to two rows in database
What is the right syntax for MySQL injection security for $_GET and wildcard
ZF2 ProgressBar only update after too many “updates”
zend framework skeleton: why does the line require 'init_autoloader.php' work?
How to create dynamic classes using PHP and using with jQuery
How to resize and watermark on an image at a time using CodeIgniter?
SOAP Authentication of Username Password Token Failed
Php Group array by value and count group item
Laravel model issue (non-object)
Someone point my website with his domain, how can I block? [closed]