Note that there are some explanatory texts on larger screens.

plurals
  1. POConflicting Modrewrite Rules
    primarykey
    data
    text
    <p>As my previous questions may already show you, I am not great with modrewrite. I have tried to search and come up empty for this particular issue. I hope that someone can assist me with fixing this up;</p> <p>I am using modrewrite as part of a Short URL generator, accessing the unique ID directly will forward them to their destination. adding /v on to the end will allow a portal page that will display the URL they are being forwarded to (Like a Preview Page)</p> <p>Because the /v comes after the ID, it works just fine, however I want to allow for new pages to be added via <strong>$_GET</strong></p> <p><strong>This is the shortcut link being given to users;</strong></p> <pre><code>javascript:void(location.href='http://www.website.com/n/?url='+location.href) </code></pre> <p><strong>This is the content of the .htaccess</strong></p> <pre><code>RewriteEngine On RewriteRule ^n actions.php?do=new [NS,L,NC] RewriteRule ^([a-zA-Z0-9]+)$ actions.php?id=$1 [NC] RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ actions.php?id=$1&amp;do=$2 [NC] </code></pre> <p><strong>The Problem:</strong> because <strong>/n</strong> is in place of the ID, it obviously conflicts. I have tried NS and L because they are able to stop execution after the rule is matched. Upon further inspection, they of course dont work as well as I would like.</p> <p>Finally, here are some examples of how the URL's are desired to look in the final product;</p> <pre><code> New Submission: http://www.web.com/n/?url=http://www.google.com [Outputs new URL as 12345] Visit the ID directly: http://www.web.com/1A2b34D5 [Forwards to URL Destination] Visit the ID Preview Link: http://www.web.com/1A2b34D5/v [Displays preview, Delayed Forwarder] </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload