.htaccess question...

by 2 replies
3
Hi,
I am having some problem with my .htaccess...

The URL should pass like this....

Code:
http://www.mywebsite.com/index.php?page=dealer-accounts&id=2
But when I hover on account it shows me this URL which then redirects to main page...

Code:
http://www.mywebsite.com/index.php?page=&id=2
Here is my .htaccess file....

Code:
# enable apache morRewrite module #
RewriteEngine on

RewriteBase /

# set files headers
<IfModule mod_headers.c>
<FilesMatch ".(css|js|png|gif|jpg|jpeg|htc)$">
Header set Cache-Control "max-age=2678400, public, must-revalidate"
</FilesMatch>
</IfModule>

# deflate static content
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/x-component text/css application/x-javascript application/javascript
</IfModule>

# allow request methods
<Limit POST PUT DELETE GET OPTIONS HEAD>
   Order deny,allow
   Allow from All
</Limit>

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

ErrorDocument 404 /404.html

# define system languages
RewriteRule ^([^//]+)/?(.{2})?/$ index.php?page=$1 [QSA,L]

# define paging
RewriteRule ^([^//]+)/?(.*)?/index([0-9]*).ht(m?ml?)$ index.php?page=$1&rlVareables=$2&pg=$3 [QSA,L]

# define listing
RewriteRule ^([^/][w-_]+)(.+)-l?([0-9]+).ht(m|ml)$ index.php?page=$1&rlVareables=$2&listing_id=$3 [QSA,L]

# define account details request
RewriteRule ^((w{2})/)?([w-_]{3,})$ index.php?page=$3&lang=$2&account_request [QSA,L]

# define single pages
RewriteRule ^([^//]+)/?(^/*)?.ht(m?ml?)$ index.php?page=$1 [QSA,L]

# define other pages
RewriteRule ^([^//]+)/?(.*)?/?(.*)?(.ht(m?ml?)|/+)$ index.php?page=$1&rlVareables=$2 [QSA,L]
Any help would be appreciated.....

Regards
#programming #htaccess #question
  • hey,

    that has nothing do to with .htaccess..
    Links are not created by htaccess, where ever that link is created in your code is where it goes wrong...

    htaccess can be used to make links look good eg:
    http://page.com/phones/samsung

    which then can be translated to (example):
    http://page.com/displayproducts.php?...&brand=samsung

    whatever you see when hovering over with your mouse has nothing to do with htaccess.
  • Steve is right, check your code why the link it created has lack of data in it.

Next Topics on Trending Feed