Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8922567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:52:14+00:00 2026-06-15T06:52:14+00:00

How can i archieve permalink urls with php scripts? I mean something like wordpress

  • 0

How can i archieve permalink urls with php scripts?
I mean something like wordpress does for it posts like

url: www.example.com/year/entry 

$year = ...
$entry = ...

without having the actual folder created …
I dont want to use .htacess because WordPress does not use it either i think.

Normal behaviour would be a 404 Error because the folder does not exist.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T06:52:15+00:00Added an answer on June 15, 2026 at 6:52 am

    Use mod rewrite in Apache (different servers will allow different rewriting mechanisms).

    http://httpd.apache.org/docs/current/mod/mod_rewrite.html

    Most of the time the rewrites are done using regex. Here is an example (i will explain what it does after) that you put in a .htaccess file in the root directory of your site ie: http://website.com/

    RewriteEngine on
    RewriteRule ^js/main.js$ /scripts/main.php [L]
    

    That will allow you to enter the following in your browser: http://website.com/main.js But the file will actually be located on the server at http://website.com/scripts/main.php and the files can be located OUT of the public directory for better security.

    Another example but this time using a little more regex

    RewriteEngine on
    RewriteRule ^js/([0-9a-f]+).js$ /scripts/main.php [L]
    

    Allows all these to go to the same file:

    • http://website.com/abc018.js
    • http://website.com/fbc01.js
    • http://website.com/8bc18.js

    will all load http://website.com/scripts/main.php

    P.S. The [L] indicates to the server that it’s the LAST rewrite and it does not need to keep looking for matches.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In .NET you can achieve something like this: Color yellowColor = Color.FromName(yellow); Is there
Does anyone know of any jQuery plugins that can achieve the scrolling effect like
I'm using WordPress to generate a list of posts. The outputted HTML looks something
We know that, we can set a permalink structure for wordpress from settings. But,
I would like to use wordpress permalinks but only for posts. Is there any
I am trying to rewrite a url in wordpress so that I can serve
How can I achieve this behaviors onclick with jquery : default state: <a href=something.html>Anchor</a>
There is a way to create a constraint or something where I can have
i select products with $products = Mage::getModel('catalog/product')->getCollection()->addAttributeToFilter('entity_id', array('in' => $productIds)); how can i archieve
I just moved my Wordpress site to a different server and url. All the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.