Report this

What is the reason for this report?

Is there a way to prevent mod rewrite from breaking down images , script and links

Posted on October 30, 2016

my mod_rewrite looks like this

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|css|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php

RewriteRule ^profile/([A-Za-z0-9-]+) profile.php?u=$1[NC]
</IfModule>


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Sorry to see that your question hasn’t received an answer yet. Unfortunately, after this much time, it is unlikely that an answer for this specific question will be provided. For people still landing here via search, check out this tutorial. It shows you how to get up and running with mod_rewrite for Apache:

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.