Welcome to Geeklog, Anonymous Monday, November 25 2024 @ 11:32 pm EST
Geeklog Forums
Playing with rewrite
Status: offline
alb3rt
Forum User
Regular Poster
Registered: 10/30/06
Posts: 71
Location:Mexico City
Hi boys,
I try to implement rewrite for topics (independent) via .htaccess, with this rules:
URL REAL URL
~/sectionA -> /real_topicA
~/sectionA/topicX -> /real_topicX
~/sectionA/topicX/article1 -> /article1
The idea is:
If exist article1 redirect to the article
else if exist topicX redirect to topicX
else if exit sectionA redict to topicA
I try this:
RewriteRule ^topicX/articleX /article.php?story=articleX [L]
But always applied the first rule, always redirect to /index.php?topic=topicX
Any idea how to implement this?
D Web Studio - www.d-webstudio.net
I try to implement rewrite for topics (independent) via .htaccess, with this rules:
Text Formatted Code
URL REAL URL
~/sectionA -> /real_topicA
~/sectionA/topicX -> /real_topicX
~/sectionA/topicX/article1 -> /article1
The idea is:
If exist article1 redirect to the article
else if exist topicX redirect to topicX
else if exit sectionA redict to topicA
I try this:
Text Formatted Code
RewriteRule ^topicX /index.php?topic=topicX[L]RewriteRule ^topicX/articleX /article.php?story=articleX [L]
But always applied the first rule, always redirect to /index.php?topic=topicX
Any idea how to implement this?
D Web Studio - www.d-webstudio.net
11
9
Quote
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Hello,
According to the apache documentation
Read more here
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
According to the apache documentation
The definition order of these rules is important, because this order is used when applying the rules at run-time.
Read more here
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
8
8
Quote
Status: offline
alb3rt
Forum User
Regular Poster
Registered: 10/30/06
Posts: 71
Location:Mexico City
Hi Ben,
You're right, it works.
Thanks.
D Web Studio - www.d-webstudio.net
You're right, it works.
Thanks.
Quote by: cordiste
Read more here
::Ben
Hello,
According to the apache documentation
The definition order of these rules is important, because this order is used when applying the rules at run-time.
Read more here
::Ben
D Web Studio - www.d-webstudio.net
11
13
Quote
All times are EST. The time is now 11:32 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content