php


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
" />

Related Links

can someone briefly explain Single sign on? i want to use openid as SSO
Efficient flat file searching in PHP
Form Builder GUI for PHP
$_SESSION difficulties
How do Python and PHP compare for ecommerce?
Wordpress PHP If else help
Changing upload_max_filesize on PHP
php session and path setting
php script Config settings
PHP SOAP client that understands multi-part messages?
php check if domain equals value, then perform action
How can I implement RSS 2 in Code Igniter?
Error with MySQL syntax using REPLACE INTO
how to store chechbox value in php
mysql muliple queries in one statement
PHP Static Variables

Categories

HOME
python-2.7
opengl
knockout.js
plesk
opencart
clearcase
couchdb
operating-system
typeerror
bing-search
web2py
gentelella
swift2
mithril.js
kurento
hspi
wine
spring-security-oauth2
getopenfilename
rangy
cname
buffer
live-streaming
supervisord
nose
akka-persistence
bosun
acl
jpa-2.1
strophe.js
tortoisehg
math.js
basic-authentication
series
private-key
creation
dreamfactory
installanywhere
macports
django-smart-selects
hidden-markov-models
game-center
suds
jacoco-maven-plugin
intellij-lombok-plugin
cloudwatch
exc-bad-access
android-mediarecorder
mongodb-aggregation
dtd
dex
front-camera
prefetch
finder
petsc
allegro
cefpython
pjax
google-identity-toolkit
libharu
openquery
django-testing
msbuild-4.0
raw-sockets
qtcpsocket
openmrs
univocity
management-studio-express
android-expansion-files
ioexception
gdl
ora-04091
jnlp
featuretoggle
swagger-maven-plugin
smacss
inequality
mfmessagecomposeview
xulrunner
air-native-extension
xmi
windows-taskbar
iosched
armv6
mft
ctp
xsd2code
web-frameworks
chefspec
handshake
email-verification
taskkill
zend-server-ce
qtextbrowser
getopts
grails-validation
servlet-container
aptitude
tessellation
3-tier
uninstaller
iphone-sdk-4.3
firephp
suggestbox
code-camp
error-detection
synthesizer

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App