How to do a specific condition for escaped_fragment with rewrite rule in .htaccess
Asked Answered
C

1

2

I have urls like that /#!/page1, I redirect them with :

  RewriteCond %{QUERY_STRING} ^_escaped_fragment_=%2F(.*)$
  RewriteRule ^$ /seo/%1.html [QSA,L]

So /#!/page1 read as /_escaped_fragment_=%2Fpage1 is redirected to /seo/page1.html

It's work perfectly however I want to redirect the home /#!/ to /seo/index.html which actually redirect to /seo/.html

How can I do that? Thanks

Counterinsurgency answered 14/6, 2013 at 12:54 Comment(0)
C
1

I fixed it with:

 RewriteCond %{QUERY_STRING} ^_escaped_fragment_=%2F$
 RewriteRule ^$ /seo/index.html [QSA,L]

 RewriteCond %{QUERY_STRING} ^_escaped_fragment_=%2F(.*)$
 RewriteRule ^$ /seo/%1.html [QSA,L]
Counterinsurgency answered 26/6, 2013 at 12:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.