Forum Moderators: phranque

Message Too Old, No Replies

[ask] htaccess and mod rewrite problem.

again...

         

edi2004

7:09 pm on Sep 22, 2008 (gmt 0)

10+ Year Member



I want to rewrite any url like this pattern:

http://example.com/my.cat/my.dog/

and showing the output of:

http://example.com/mypage.php?category=my.cat&article=my.dog

but when i try this url:

http://example.com/my.cat/my.dog

it show the 404 error page.

this is my htaccess file content:

IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName my.site.com

RewriteEngine On

RewriteRule ^searchengine/([^/]*)/([^/]*)/$ /search_engine.php?query=$1&pages=$2 [L]
RewriteRule ^searchengine/([^/]*)/$ /search_engine.php?query=$1 [L]
RewriteRule ^searchengine/$ /search_engine.php? [L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/$ /show_article.php?category=$1&article=$2&pages=$3 [L]
RewriteRule ^([^/]*)/([^/]*)/$ /show_article.php?category=$1&article=$2 [L]
RewriteRule ^([^/]*)/$ /show_article.php?category=$1 [L]

Thank you in advance.

[edited by: jdMorgan at 2:43 am (utc) on Sep. 23, 2008]
[edit reason] Please use example.com [/edit]

edi2004

11:37 pm on Sep 22, 2008 (gmt 0)

10+ Year Member



I am also creating a subdomain that special for WAP mobile users.
But the subdomain was is a directory that below the public_html where is located the .htaccess file, so the page was redirected to the same URI but different subdomain.

Anyone can help me?