Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to configure a mod_rewrite for CMSMS?

Posted on 2008-10-28
3
Medium Priority
?
542 Views
Last Modified: 2013-12-09
I'm using a CMS (CMSMS) that formats the links with the following structure when configured for mod_rewrite :
http://domain.tld/parent/content

This parent/content URL scheme is automatic and cannot be deactivated.

I've modified the CMS to take a language parameter into account, so now the URLs look like this :
http://domain.tld/langage/parent/content

What rewrite_rule should I use, knowing that when not using mod_rewrite, my CMS accepts these two arguments only :
index.php?hl=language&page=content
0
Comment
Question by:CPL593H
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 27

Expert Comment

by:caterham_www
ID: 22823712
How does your current rewriteRule look like?

Basically it should look like
RewriteEngine on
RewriteRule ^([^/]+)/parent/(.*) /index.php?hl=$1&page=$2 [L]

Open in new window

0
 

Author Comment

by:CPL593H
ID: 22829244
Note that in CMSMS, the parent/content portion of the URL is automatically generated by parsing the page order and checking a page's parent.
When not using mod_rewrite, the parent/content mode is not used, only the content is being passed as an argument.

These are my current rewriteRules :
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^([^/]+)/(.*)$ index.php?page=$2&hl=$1 [QSA]

Open in new window

0
 

Accepted Solution

by:
CPL593H earned 0 total points
ID: 22848265
I found a solution to my problem.  It appears that the rewriteBase was not set in my .htaccess; thus redirecting URLs to the wrong directory.  The above RewriteRule is therefore correct and works very well.
0

Featured Post

Use Filtering Commands to Process Files in Linux

Learn how to manipulate data with the help of various filtering commands such as `cat`, `fmt`, `pr`, and others in Linux.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question