- Impact
- 10
Hi
I'm working on the simple website that must have seo-freindly links.
I have never used mod_rewrite since today so I really need some help to make it work.
This is the content of my htaccess file. It works only partially.
RewriteEngine On
RewriteRule ^([^/.]+)/?$ product.php?product=$1 [L]
RewriteRule ^misc/contact$ contact.php [L]
RewriteRule ^misc/about$ about.php [L]
When I enter the address: mysite.com/printer everything is OK, I got what I want - page shows printer.
But when I enter mysite.com/misc/about I got "about" page with missing graphics and every link on the page is changed and contains "misc" prefix now.
They looks as follows:
mysite.com/misc/contact.php (should be mysite.com/contact)
mysite.com/misc/about.php (should be mysite.com/about)
mysite.com/misc/index.php (should be just mysite.com)
etc.
All php files are in the same directory.
What did I wrong? Can anyone help me?
I'm working on the simple website that must have seo-freindly links.
I have never used mod_rewrite since today so I really need some help to make it work.
This is the content of my htaccess file. It works only partially.
RewriteEngine On
RewriteRule ^([^/.]+)/?$ product.php?product=$1 [L]
RewriteRule ^misc/contact$ contact.php [L]
RewriteRule ^misc/about$ about.php [L]
When I enter the address: mysite.com/printer everything is OK, I got what I want - page shows printer.
But when I enter mysite.com/misc/about I got "about" page with missing graphics and every link on the page is changed and contains "misc" prefix now.
They looks as follows:
mysite.com/misc/contact.php (should be mysite.com/contact)
mysite.com/misc/about.php (should be mysite.com/about)
mysite.com/misc/index.php (should be just mysite.com)
etc.
All php files are in the same directory.
What did I wrong? Can anyone help me?