semiSkim
07-12-2011, 02:06 AM
All pages must redirect to a single file to be run: module.php
When a page has an extra variable in the query string such as below the images and links are broken on the page as they require '../' as a prefix.
http://localhost/module/pages/editPage/&id=1/
(the above URL passes the module and id variable successfully)
Is there a way to pass extra query string values with a script without the URLS changing with the addition of a query string variable?
My .htaccess file:
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} ^.*\/index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !example.php
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ $1/ [L,R=301]
RewriteRule ^module/(.*)/$ module.php?module=$1 [NC]
When a page has an extra variable in the query string such as below the images and links are broken on the page as they require '../' as a prefix.
http://localhost/module/pages/editPage/&id=1/
(the above URL passes the module and id variable successfully)
Is there a way to pass extra query string values with a script without the URLS changing with the addition of a query string variable?
My .htaccess file:
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} ^.*\/index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !example.php
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ $1/ [L,R=301]
RewriteRule ^module/(.*)/$ module.php?module=$1 [NC]