[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Disable mod_rewrite in folder

Posted on 2010-04-07
5
Medium Priority
?
414 Views
Last Modified: 2012-05-09
I have some mod_rewrite in a htaccess file to make pretty urls, but I would like to disable the function for a subfolder - how can I do that?

I have tried the following, but it doesn't change anything :(
# Exclude mod_rewrite for WP
RewriteCond %{REQUEST_URI} !^/wordpress

# Rewrite for pretty url
RewriteRule ^([a-zA-Z0-9\-_/]+)$ /index.php?url=$1 [QSA]

Open in new window

0
Comment
Question by:Thingmand
  • 3
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
NeoAshura earned 2000 total points
ID: 30014882
The most foolproof way to do it would be to bypass the drupal mod_rewrite directives for those directories. For example to bypass the rules for the subdirectory "/no_rewrite/mystuff/dir1/" you would add the code:

RewriteRule ^no_rewrite/mystuff/dir1 - [L]
0
 
LVL 6

Expert Comment

by:NeoAshura
ID: 30014991
these needs to go  ahead of the RewriteRules for drupal.
0
 

Author Comment

by:Thingmand
ID: 30015375
Drupal? Why are you talking about Drupal?
0
 

Author Closing Comment

by:Thingmand
ID: 31711771
Well, it works :)

RewriteRule ^wordpress - [L]
0
 
LVL 6

Expert Comment

by:NeoAshura
ID: 30029397
no problem glad i could help. thanks
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

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

It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
By following these Magento e-commerce development tips, you can increase your website's conversion and profitability. Read this post for more details.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

613 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